aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-08-31 16:29:21 +0100
committerPratik Naik <pratiknaik@gmail.com>2008-08-31 16:29:21 +0100
commit56c2b02f592aa7c127346f2c68ac45236c27702e (patch)
treea9eadea109c36c29be817e906f8808b1f61356d7 /actionpack/lib
parentcdda7defa0a37ff776ca961c8eeae347a46dd59b (diff)
downloadrails-56c2b02f592aa7c127346f2c68ac45236c27702e.tar.gz
rails-56c2b02f592aa7c127346f2c68ac45236c27702e.tar.bz2
rails-56c2b02f592aa7c127346f2c68ac45236c27702e.zip
Fix AM tests and add tests for rendering logging
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/base.rb2
-rw-r--r--actionpack/lib/action_view/base.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index 1f3ffe2933..f527b131d8 100644
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -871,6 +871,7 @@ module ActionController #:nodoc:
end
response.layout = layout = pick_layout(options)
+ logger.info("Rendering template within #{layout}") if logger && layout
if content_type = options[:content_type]
response.content_type = content_type.to_s
@@ -1122,6 +1123,7 @@ module ActionController #:nodoc:
private
def render_for_file(template_path, status = nil, layout = nil, locals = {}) #:nodoc:
+ logger.info("Rendering #{template_path}" + (status ? " (#{status})" : '')) if logger
render_for_text @template.render(:file => template_path, :locals => locals, :layout => layout), status
end
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index 9a2b667005..e9087560a1 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -253,7 +253,6 @@ module ActionView #:nodoc:
ActiveSupport::Deprecation.warn("use_full_path option has been deprecated and has no affect.", caller)
end
- logger.info("Rendering #{options[:file]}") if logger
pick_template(options[:file]).render_template(self, options[:locals])
elsif options[:partial]
render_partial(options)
@@ -353,7 +352,6 @@ module ActionView #:nodoc:
def render_with_layout(options, local_assigns, &block)
partial_layout = options.delete(:layout)
- logger.info("Rendering template within #{partial_layout}") if logger
if block_given?
begin