Permalink
Browse files

use meaningful names with our variables

  • Loading branch information...
1 parent 0155bf4 commit 940404096fecd57fdece94d0a6cfe524f20a2aa8 @tenderlove tenderlove committed Aug 9, 2011
Showing with 6 additions and 6 deletions.
  1. +6 −6 actionpack/lib/action_view/template/resolver.rb
View
12 actionpack/lib/action_view/template/resolver.rb
@@ -134,14 +134,14 @@ def query(path, details, formats)
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

0 comments on commit 9404040

Please sign in to comment.