aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-03-19 17:20:15 +0100
committerJosé Valim <jose.valim@gmail.com>2010-03-19 17:20:20 +0100
commitf28d856cece877d1b2f306f54aeb12cce1db1023 (patch)
treef2ca547068d20558acc80433ef5f667f61f78737 /actionpack/test/lib
parentfbe35656a95228f760a2cd09676423ba41fe70ab (diff)
downloadrails-f28d856cece877d1b2f306f54aeb12cce1db1023.tar.gz
rails-f28d856cece877d1b2f306f54aeb12cce1db1023.tar.bz2
rails-f28d856cece877d1b2f306f54aeb12cce1db1023.zip
Improve performance of the rendering stack by freezing formats as a sign that they shouldn't be further modified.
Diffstat (limited to 'actionpack/test/lib')
-rw-r--r--actionpack/test/lib/fixture_template.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/lib/fixture_template.rb b/actionpack/test/lib/fixture_template.rb
index 74c0918a14..b49ccd39ca 100644
--- a/actionpack/test/lib/fixture_template.rb
+++ b/actionpack/test/lib/fixture_template.rb
@@ -9,7 +9,7 @@ module ActionView #:nodoc:
private
- def query(path, exts)
+ def query(path, exts, formats)
query = Regexp.escape(path)
exts.each do |ext|
query << '(' << ext.map {|e| e && Regexp.escape(".#{e}") }.join('|') << '|)'
@@ -17,7 +17,7 @@ module ActionView #:nodoc:
templates = []
@hash.select { |k,v| k =~ /^#{query}$/ }.each do |path, source|
- handler, format = extract_handler_and_format(path)
+ handler, format = extract_handler_and_format(path, formats)
templates << Template.new(source, path, handler,
:virtual_path => path, :format => format)
end