diff options
Diffstat (limited to 'railties/lib/rails/engine.rb')
-rw-r--r-- | railties/lib/rails/engine.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 383be1802f..b358de89d0 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -330,6 +330,14 @@ module Rails autoload :Configuration, "rails/engine/configuration" autoload :Railties, "rails/engine/railties" + def load_generators(app=self) + initialize_generators + railties.all { |r| r.load_generators(app) } + Rails::Generators.configure!(app.config.generators) + super + self + end + class << self attr_accessor :called_from, :isolated alias :isolated? :isolated @@ -567,6 +575,10 @@ module Rails protected + def initialize_generators + require "rails/generators" + end + def routes? defined?(@routes) end |