Class: ActionView::OptimizedFileSystemResolver

Inherits:
FileSystemResolver show all
Defined in:
actionview/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

Methods inherited from FileSystemResolver

#eql?, #initialize, #to_s

Methods inherited from PathResolver

#initialize

Methods inherited from Resolver

#clear_cache, #find_all, #initialize

Constructor Details

This class inherits a constructor from ActionView::FileSystemResolver

Instance Method Details

#build_query(path, details) ⇒ Object

:nodoc:



324
325
326
327
328
329
330
331
332
# File 'actionview/lib/action_view/template/resolver.rb', line 324

def build_query(path, details)
  query = escape_entry(File.join(@path, path))

  exts = EXTENSIONS.map do |ext, prefix|
    "{#{details[ext].compact.uniq.map { |e| "#{prefix}#{e}," }.join}}"
  end.join

  query + exts
end