Permalink
Browse files

fixes the failure of config.plugins without :all option tests [#3718

…status:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent 6e26be6 commit d1ffc54c06fbacf46783f5ebc84bc125c9188fd1 @spastorino spastorino committed with josevalim Jan 17, 2010
Showing with 3 additions and 4 deletions.
  1. +3 −4 railties/lib/rails/application.rb
@@ -93,13 +93,12 @@ def initializers
initializers
end
- # TODO: Fix this method
+ # TODO: Fix this method. It loads all railties independent if :all is given
+ # or not, otherwise frameworks are never loaded.
def plugins
@plugins ||= begin
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)
+ Railtie.plugins.map(&:new) + Plugin.all(plugin_names, config.paths.vendor.plugins)
end
end

0 comments on commit d1ffc54

Please sign in to comment.