instance method
template_glob
Ruby on Rails 7.1.6
Since v7.0.10 PrivateSignature
template_glob(glob)
Safe glob within @path
Parameters
-
globreq
Source
# File actionview/lib/action_view/template/resolver.rb, line 198
def template_glob(glob)
query = File.join(escape_entry(@path), glob)
path_with_slash = File.join(@path, "")
Dir.glob(query).filter_map do |filename|
filename = File.expand_path(filename)
next if File.directory?(filename)
next unless filename.start_with?(path_with_slash)
filename
end
end
Defined in actionview/lib/action_view/template/resolver.rb line 198
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::FileSystemResolver