diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/application.rb | 7 | ||||
-rw-r--r-- | railties/test/plugins/vendored_test.rb | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 3fb4b723ab..b3b48194d4 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -91,9 +91,10 @@ module Rails # TODO: Fix this method def plugins @plugins ||= begin - plugin_names = config.plugins || [:all] - Railtie.plugins.select { |p| plugin_names.include?(:all) || plugin_names.include?(p.plugin_name) }.map { |p| p.new } + - Plugin.all(config.plugins || [:all], config.paths.vendor.plugins) + plugin_names = (config.plugins || [:all]).map { |p| p.to_sym } + Railtie.plugins.select { |p| + plugin_names.include?(:all) || plugin_names.include?(p.plugin_name) + }.map { |p| p.new } + Plugin.all(plugin_names, config.paths.vendor.plugins) end end diff --git a/railties/test/plugins/vendored_test.rb b/railties/test/plugins/vendored_test.rb index 9a2d40cad8..b3b85891b2 100644 --- a/railties/test/plugins/vendored_test.rb +++ b/railties/test/plugins/vendored_test.rb @@ -191,5 +191,11 @@ module PluginsTest boot_rails assert_equal [:a, :c, :b], $arr end + + test "plugin order array is strings" do + add_to_config "config.plugins = %w( c_plugin all )" + boot_rails + assert_equal [:c, :a, :b], $arr + end end -end
\ No newline at end of file +end |