aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/lib/fixture_template.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-03-09 13:12:11 +0100
committerJosé Valim <jose.valim@gmail.com>2010-03-09 13:12:11 +0100
commit00d6271d2b11a14065925529af0c1200406f8beb (patch)
treee3024baa083ef39b97f0293da8661cb3744957ba /actionpack/test/lib/fixture_template.rb
parentc507e16dba844c7b066d145bfd5c5d23e7a9c5ad (diff)
downloadrails-00d6271d2b11a14065925529af0c1200406f8beb.tar.gz
rails-00d6271d2b11a14065925529af0c1200406f8beb.tar.bz2
rails-00d6271d2b11a14065925529af0c1200406f8beb.zip
Clean up the API required from ActionView::Template.
Diffstat (limited to 'actionpack/test/lib/fixture_template.rb')
-rw-r--r--actionpack/test/lib/fixture_template.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/test/lib/fixture_template.rb b/actionpack/test/lib/fixture_template.rb
index a7f0490984..d287fae470 100644
--- a/actionpack/test/lib/fixture_template.rb
+++ b/actionpack/test/lib/fixture_template.rb
@@ -7,7 +7,7 @@ module ActionView #:nodoc:
private
- def query(path, exts)
+ def query(partial, path, exts)
query = Regexp.escape(path)
exts.each do |ext|
query << '(?:' << ext.map {|e| e && Regexp.escape(".#{e}") }.join('|') << ')'
@@ -15,9 +15,11 @@ module ActionView #:nodoc:
templates = []
@hash.select { |k,v| k =~ /^#{query}$/ }.each do |path, source|
- templates << Template.new(source, path, *path_to_details(path))
+ handler, format = extract_handler_and_format(path)
+ templates << Template.new(source, path, handler,
+ :partial => partial, :virtual_path => path, :format => format)
end
- templates.sort_by {|t| -t.details.values.compact.size }
+ templates.sort_by {|t| -t.formats.size }
end
end