aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/generators.rb12
-rw-r--r--railties/test/railties/generators_test.rb3
2 files changed, 2 insertions, 13 deletions
diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb
index 508d5359ba..355b05ce0b 100644
--- a/railties/lib/rails/generators.rb
+++ b/railties/lib/rails/generators.rb
@@ -20,6 +20,8 @@ module Rails
autoload :ResourceHelpers, 'rails/generators/resource_helpers'
autoload :TestCase, 'rails/generators/test_case'
+ mattr_accessor :namespace
+
DEFAULT_ALIASES = {
:rails => {
:actions => '-a',
@@ -90,16 +92,6 @@ module Rails
@options ||= DEFAULT_OPTIONS.dup
end
- def self.namespace
- @namespace ||= if defined?(Rails) && Rails.application
- Rails.application.class.parents.detect { |n| n.respond_to?(:_railtie) }
- end
- end
-
- def self.namespace=(namespace)
- @namespace ||= namespace
- end
-
# Hold configured generators fallbacks. If a plugin developer wants a
# generator group to fallback to another group in case of missing generators,
# they can add a fallback.
diff --git a/railties/test/railties/generators_test.rb b/railties/test/railties/generators_test.rb
index 4f96e4d9ef..963518880d 100644
--- a/railties/test/railties/generators_test.rb
+++ b/railties/test/railties/generators_test.rb
@@ -58,9 +58,6 @@ module RailtiesTests
build_engine(true)
end
- def setup
- end
-
def test_controllers_are_correctly_namespaced_when_engine_is_mountable
build_mountable_engine
Dir.chdir(engine_path) do