method
all_helpers_from_path
v4.2.9 -
Show latest stable
- Class:
ActionController::Helpers::ClassMethods
all_helpers_from_path(path)public
No documentation available.
# File actionpack/lib/action_controller/metal/helpers.rb, line 96
def all_helpers_from_path(path)
helpers = Array(path).flat_map do |_path|
extract = /^#{Regexp.quote(_path.to_s)}\/?(.*)_helper.rb$/
names = Dir["#{_path}/**/*_helper.rb"].map { |file| file.sub(extract, '\1') }
names.sort!
end
helpers.uniq!
helpers
end