mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Revert "Add a generator_paths config option"
This reverts commit 8665c754cb.
This commit is contained in:
@@ -22,17 +22,15 @@ module Rails
|
||||
end
|
||||
end
|
||||
|
||||
attr_reader :middleware, :generator_paths
|
||||
attr_reader :middleware
|
||||
|
||||
def initialize(base = nil)
|
||||
if base
|
||||
@options = base.options.dup
|
||||
@middleware = base.middleware.dup
|
||||
@generator_paths = base.generator_paths.dup
|
||||
@options = base.options.dup
|
||||
@middleware = base.middleware.dup
|
||||
else
|
||||
@options = Hash.new { |h,k| h[k] = ActiveSupport::OrderedOptions.new }
|
||||
@middleware = self.class.default_middleware_stack
|
||||
@generator_paths = []
|
||||
@options = Hash.new { |h,k| h[k] = ActiveSupport::OrderedOptions.new }
|
||||
@middleware = self.class.default_middleware_stack
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -24,12 +24,6 @@ module PluginsTest
|
||||
assert_equal "hello", AppTemplate::Application.config.foo.greetings
|
||||
end
|
||||
|
||||
test "plugins can provide generators" do
|
||||
class Foo < Rails::Railtie ; config.generator_paths << "/foo" ; end
|
||||
require "#{app_path}/config/application"
|
||||
assert_eqaul ["/foo"], AppTemplate::Application.config.generator_paths
|
||||
end
|
||||
|
||||
test "plugin config merges are deep" do
|
||||
class Foo < Rails::Railtie ; config.foo.greetings = 'hello' ; end
|
||||
class MyApp < Rails::Application
|
||||
|
||||
Reference in New Issue
Block a user