Skip to content

Instantly share code, notes, and snippets.

@GuilleLeopold
Created February 3, 2020 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GuilleLeopold/18a56454cf74d4ec2804ebf77128961f to your computer and use it in GitHub Desktop.
Save GuilleLeopold/18a56454cf74d4ec2804ebf77128961f to your computer and use it in GitHub Desktop.
Code block to run migrations from each engine
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