Permalink
Browse files

Rails.application is set anyway, we don't need to set it manually, th…

…is was purpose of different behavior in tests and in application

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent 00aa13b commit 135d6164c580cbc52f8f34c38acaae1413ad0a6c @drogus drogus committed with josevalim Sep 24, 2010
Showing with 1 addition and 3 deletions.
  1. +1 −1 railties/lib/rails/generators/named_base.rb
  2. +0 −2 railties/test/abstract_unit.rb
@@ -46,7 +46,7 @@ def inside_namespace
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
@@ -16,5 +16,3 @@ class Application < Rails::Application
config.root = File.dirname(__FILE__)
end
end
-
-Rails.application = TestApp::Application

0 comments on commit 135d616

Please sign in to comment.