Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use debug to report compilation of erb templates

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 06160fd3e85e99374ac09bb941aa499eba7a98c5 1 parent 8b1b72b
@dhh dhh authored
Showing with 4 additions and 6 deletions.
  1. +4 −6 actionpack/lib/action_view/base.rb
View
10 actionpack/lib/action_view/base.rb
@@ -287,16 +287,13 @@ def evaluate_assigns(local_assigns = {})
self.class.class_eval "def #{key}=(v); #{varstr} = v; end"
end
end
- #if logger
- # logger.info "assigns: #{@assigns.keys.join', '}"
- # logger.info "local_assigns: [#{local_assigns.keys.join', '}]" if local_assigns
- # logger.info "saved_locals: [#{local_assigns.keys.join', '}]" if saved_locals
- #end
+
saved_locals
end
def compile_erb_template(template, file_name)
cache_name = file_name || template
+
unless @@compiled_erb_templates[cache_name]
erb = ERB.new(template, nil, @@erb_trim_mode)
erb_name = 'run_erb_'
@@ -317,8 +314,9 @@ def compile_erb_template(template, file_name)
@@compiled_erb_templates[cache_name] = erb_name.intern
@@loaded_templates[cache_name] = Time.now if file_name
- logger.info "Compiled erb template #{cache_name}\n ==> #{erb_name}" if logger
+ logger.debug "Compiled erb template #{cache_name}\n ==> #{erb_name}" if logger
end
+
@@compiled_erb_templates[cache_name]
end
Please sign in to comment.
Something went wrong with that request. Please try again.