Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save westonganger/fca9977560850f296361b4577a725b0b to your computer and use it in GitHub Desktop.
Save westonganger/fca9977560850f296361b4577a725b0b to your computer and use it in GitHub Desktop.
# lib/<project_name>/engine.rb
module RailsI18nManager
class Engine < ::Rails::Engine
isolate_namespace RailsI18nManager
### Automatically load all migrations into main rails app
initializer "rails_i18n_manager.append_migrations" do |app|
if !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
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment