diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-09-24 23:39:15 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-25 10:46:22 +0200 |
commit | 135d6164c580cbc52f8f34c38acaae1413ad0a6c (patch) | |
tree | fbdc83dde530dc1df2dea0b06b5711fd39927542 /railties | |
parent | 00aa13bc0e3fdcc92152e22cc48a6d8bd21122ae (diff) | |
download | rails-135d6164c580cbc52f8f34c38acaae1413ad0a6c.tar.gz rails-135d6164c580cbc52f8f34c38acaae1413ad0a6c.tar.bz2 rails-135d6164c580cbc52f8f34c38acaae1413ad0a6c.zip |
Rails.application is set anyway, we don't need to set it manually, this was purpose of different behavior in tests and in application
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/named_base.rb | 2 | ||||
-rw-r--r-- | railties/test/abstract_unit.rb | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/railties/lib/rails/generators/named_base.rb b/railties/lib/rails/generators/named_base.rb index a1d39987e4..3632d820ee 100644 --- a/railties/lib/rails/generators/named_base.rb +++ b/railties/lib/rails/generators/named_base.rb @@ -46,7 +46,7 @@ module Rails def namespace @namespace ||= if defined?(Rails) && Rails.application - Rails.application.parents.detect { |n| n.respond_to?(:_railtie) } + Rails.application.class.parents.detect { |n| n.respond_to?(:_railtie) } end end diff --git a/railties/test/abstract_unit.rb b/railties/test/abstract_unit.rb index 45cf565e86..8b38081667 100644 --- a/railties/test/abstract_unit.rb +++ b/railties/test/abstract_unit.rb @@ -16,5 +16,3 @@ module TestApp config.root = File.dirname(__FILE__) end end - -Rails.application = TestApp::Application |