Skip to content

Instantly share code, notes, and snippets.

@strika
Created May 7, 2018 08:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save strika/d3853185d23d3cf83aaf5f4ecbc6b477 to your computer and use it in GitHub Desktop.
Save strika/d3853185d23d3cf83aaf5f4ecbc6b477 to your computer and use it in GitHub Desktop.
Append migrations from a Rails engine to the main application
initializer :append_migrations do |app|
unless app.root.to_s.match(root.to_s)
config.paths["db/migrate"].expanded.each do |expanded_path|
app.config.paths["db/migrate"] << expanded_path
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment