Class: ActionView::OptimizedFileSystemResolver
- Inherits:
-
FileSystemResolver
- Object
- Resolver
- PathResolver
- FileSystemResolver
- ActionView::OptimizedFileSystemResolver
- Defined in:
- lib/action_view/template/resolver.rb
Overview
An Optimized resolver for Rails’ most common case.
Constant Summary
Constants inherited from PathResolver
PathResolver::DEFAULT_PATTERN, PathResolver::EXTENSIONS
Instance Method Summary collapse
-
#build_query(path, details) ⇒ Object
:nodoc:.
Methods inherited from FileSystemResolver
Methods inherited from PathResolver
Methods inherited from Resolver
#clear_cache, #find_all, #find_all_anywhere, #find_all_with_query, #initialize
Constructor Details
This class inherits a constructor from ActionView::FileSystemResolver
Instance Method Details
#build_query(path, details) ⇒ Object
:nodoc:
365 366 367 368 369 370 371 372 373 374 375 376 377 |
# File 'lib/action_view/template/resolver.rb', line 365 def build_query(path, details) query = escape_entry(File.join(@path, path)) exts = EXTENSIONS.map do |ext, prefix| if ext == :variants && details[ext] == :any "{#{prefix}*,}" else "{#{details[ext].compact.uniq.map { |e| "#{prefix}#{e}," }.join}}" end end.join query + exts end |