1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

use meaningful names with our variables

This commit is contained in:
Aaron Patterson 2011-08-08 21:01:19 -07:00
parent 0155bf4021
commit 940404096f

View file

@ -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