mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
refactor the optimized build_query a bit
This commit is contained in:
parent
128467e927
commit
37b77c6ae7
1 changed files with 3 additions and 8 deletions
|
@ -237,15 +237,10 @@ module ActionView
|
|||
class OptimizedFileSystemResolver < FileSystemResolver #:nodoc:
|
||||
def build_query(path, details)
|
||||
exts = EXTENSIONS.map { |ext| details[ext] }
|
||||
query = File.join(@path, path)
|
||||
|
||||
exts.each do |ext|
|
||||
query << "{"
|
||||
ext.compact.uniq.each { |e| query << ".#{e}," }
|
||||
query << "}"
|
||||
end
|
||||
|
||||
query
|
||||
File.join(@path, path) + exts.map { |ext|
|
||||
"{#{ext.compact.uniq.map { |e| ".#{e}," }.join}}"
|
||||
}.join
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue