1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Revert "Add a generator_paths config option"

This reverts commit 8665c754cb.
This commit is contained in:
José Valim 2010-01-12 11:23:26 +01:00
parent a5c45e69d9
commit c4e3344a26
2 changed files with 5 additions and 13 deletions

View file

@ -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

View file

@ -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