mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
refactor the optimized build_query a bit
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user