diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-08-08 22:16:52 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-08-08 22:16:52 -0700 |
commit | 37b77c6ae7effdba51ecd8b3b91e2cdb0020b6aa (patch) | |
tree | ca2af46874513ff6295b87155e562ccf068d0ed3 /actionpack/lib/action_view | |
parent | 128467e9278f488e6a97899ee5f7880a8a0c129f (diff) | |
download | rails-37b77c6ae7effdba51ecd8b3b91e2cdb0020b6aa.tar.gz rails-37b77c6ae7effdba51ecd8b3b91e2cdb0020b6aa.tar.bz2 rails-37b77c6ae7effdba51ecd8b3b91e2cdb0020b6aa.zip |
refactor the optimized build_query a bit
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/template/resolver.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb index c66990e1ca..d0b5c76f1a 100644 --- a/actionpack/lib/action_view/template/resolver.rb +++ b/actionpack/lib/action_view/template/resolver.rb @@ -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 |