diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-08-08 21:01:19 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-08-08 21:01:19 -0700 |
commit | 940404096fecd57fdece94d0a6cfe524f20a2aa8 (patch) | |
tree | 436172345d34f1f8866d209bd2be1958a1131b86 /actionpack/lib/action_view | |
parent | 0155bf4021e34c70b3b88eaf75ce41e1140fe474 (diff) | |
download | rails-940404096fecd57fdece94d0a6cfe524f20a2aa8.tar.gz rails-940404096fecd57fdece94d0a6cfe524f20a2aa8.tar.bz2 rails-940404096fecd57fdece94d0a6cfe524f20a2aa8.zip |
use meaningful names with our variables
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/template/resolver.rb | 12 |
1 files changed, 6 insertions, 6 deletions
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 |