From 940404096fecd57fdece94d0a6cfe524f20a2aa8 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 8 Aug 2011 21:01:19 -0700 Subject: use meaningful names with our variables --- actionpack/lib/action_view/template/resolver.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb index eea869e7a0..7c1636fb60 100644 --- a/actionpack/lib/action_view/template/resolver.rb +++ b/actionpack/lib/action_view/template/resolver.rb @@ -134,14 +134,14 @@ module ActionView templates = [] sanitizer = Hash.new { |h,k| h[k] = Dir["#{File.dirname(k)}/*"] } - Dir[query].each do |p| - next if File.directory?(p) || !sanitizer[p].include?(p) + Dir[query].each do |template| + next if File.directory?(template) || !sanitizer[template].include?(template) - handler, format = extract_handler_and_format(p, formats) - contents = File.binread p + handler, format = extract_handler_and_format(template, formats) + contents = File.binread template - templates << Template.new(contents, File.expand_path(p), handler, - :virtual_path => path.virtual, :format => format, :updated_at => mtime(p)) + templates << Template.new(contents, File.expand_path(template), handler, + :virtual_path => path.virtual, :format => format, :updated_at => mtime(template)) end templates -- cgit v1.2.3