diff options
author | Stefan Sprenger <stefan.sprenger@dkd.de> | 2011-05-26 17:57:46 +0200 |
---|---|---|
committer | Stefan Sprenger <stefan.sprenger@dkd.de> | 2011-05-26 17:57:46 +0200 |
commit | 60281af200180d752b8300bdad3c0a869d56347f (patch) | |
tree | f41ba9278bd85e941b0d2fb809ce2197a281da1b /railties/lib | |
parent | 6ee461237a04122559bf9871df602eec4079cd08 (diff) | |
download | rails-60281af200180d752b8300bdad3c0a869d56347f.tar.gz rails-60281af200180d752b8300bdad3c0a869d56347f.tar.bz2 rails-60281af200180d752b8300bdad3c0a869d56347f.zip |
Move load_generators from Rails::Application to Rails::Engine
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/application.rb | 12 | ||||
-rw-r--r-- | railties/lib/rails/engine.rb | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 953233d774..497d4b5ac3 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -105,14 +105,6 @@ module Rails self end - def load_generators(app=self) - initialize_generators - railties.all { |r| r.load_generators(app) } - Rails::Generators.configure!(app.config.generators) - super - self - end - def load_console(app=self) initialize_console railties.all { |r| r.load_console(app) } @@ -195,10 +187,6 @@ module Rails end end - def initialize_generators - require "rails/generators" - end - def initialize_console require "pp" require "rails/console/app" 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 |