lib/action_controller/metal/helpers.rb in actionpack-3.0.0.beta3 vs lib/action_controller/metal/helpers.rb in actionpack-3.0.0.beta4

- old
+ new

@@ -50,12 +50,12 @@ extend ActiveSupport::Concern include AbstractController::Helpers included do - class_attribute :helpers_path - self.helpers_path = [] + config_accessor :helpers_path + self.helpers_path ||= [] end module ClassMethods def helpers_dir ActiveSupport::Deprecation.warn "helpers_dir is deprecated, use helpers_path instead" @@ -102,10 +102,10 @@ # Extract helper names from files in app/helpers/**/*_helper.rb def all_application_helpers helpers = [] helpers_path.each do |path| - extract = /^#{Regexp.quote(path)}\/?(.*)_helper.rb$/ + extract = /^#{Regexp.quote(path.to_s)}\/?(.*)_helper.rb$/ helpers += Dir["#{path}/**/*_helper.rb"].map { |file| file.sub(extract, '\1') } end helpers.sort! helpers.uniq! helpers