Method: AbstractController::Helpers::Resolution#all_helpers_from_path
- Defined in:
- actionpack/lib/abstract_controller/helpers.rb
#all_helpers_from_path(path) ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'actionpack/lib/abstract_controller/helpers.rb', line 48 def all_helpers_from_path(path) helpers = Array(path).flat_map do |_path| names = Dir["#{_path}/**/*_helper.rb"].map { |file| file[_path.to_s.size + 1..-"_helper.rb".size - 1] } names.sort! end helpers.uniq! helpers end |