Skip to content

Commit

Permalink
Use Kernel#Array in ActionController::Helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Jan 5, 2012
1 parent ec28c4f commit 56715c4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions actionpack/lib/action_controller/metal/helpers.rb
@@ -1,4 +1,3 @@
require 'active_support/core_ext/array/wrap'
require 'active_support/core_ext/class/attribute' require 'active_support/core_ext/class/attribute'


module ActionController module ActionController
Expand Down Expand Up @@ -94,7 +93,7 @@ def modules_for_helpers(args)


def all_helpers_from_path(path) def all_helpers_from_path(path)
helpers = [] helpers = []
Array.wrap(path).each do |_path| Array(path).each do |_path|
extract = /^#{Regexp.quote(_path.to_s)}\/?(.*)_helper.rb$/ extract = /^#{Regexp.quote(_path.to_s)}\/?(.*)_helper.rb$/
helpers += Dir["#{_path}/**/*_helper.rb"].map { |file| file.sub(extract, '\1') } helpers += Dir["#{_path}/**/*_helper.rb"].map { |file| file.sub(extract, '\1') }
end end
Expand Down

0 comments on commit 56715c4

Please sign in to comment.