diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2009-12-21 16:03:04 -0800 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2009-12-21 16:03:04 -0800 |
commit | a110ff0fca45c6cc74c0da5d8dcdabeed43e78b1 (patch) | |
tree | 1ce28fde2e2ba384a60dc9bce4dc960b471d5aa4 /actionpack/lib/action_view | |
parent | 36624b2c709925bcabb49d12082b9dd9d28c4c5c (diff) | |
download | rails-a110ff0fca45c6cc74c0da5d8dcdabeed43e78b1.tar.gz rails-a110ff0fca45c6cc74c0da5d8dcdabeed43e78b1.tar.bz2 rails-a110ff0fca45c6cc74c0da5d8dcdabeed43e78b1.zip |
Dont introspect inline templates for the logger and cleanup a few styling issues
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/render/rendering.rb | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/actionpack/lib/action_view/render/rendering.rb b/actionpack/lib/action_view/render/rendering.rb index 7006a5b968..d4d16b4d98 100644 --- a/actionpack/lib/action_view/render/rendering.rb +++ b/actionpack/lib/action_view/render/rendering.rb @@ -78,12 +78,12 @@ module ActionView end def _render_inline(inline, layout, options) - handler = Template.handler_class_for_extension(options[:type] || "erb") - template = Template.new(options[:inline], - "inline #{options[:inline].inspect}", handler, {}) + handler = Template.handler_class_for_extension(options[:type] || "erb") + template = Template.new(options[:inline], "inline template", handler, {}) - locals = options[:locals] + locals = options[:locals] content = template.render(self, locals) + _render_text(content, layout, locals) end @@ -91,6 +91,7 @@ module ActionView content = layout.render(self, locals) do |*name| _layout_for(*name) { content } end if layout + content end @@ -113,21 +114,16 @@ module ActionView msg end - locals = options[:locals] || {} - - content = if partial - _render_partial_object(template, options) - else - template.render(self, locals) - end - + locals = options[:locals] || {} + content = partial ? _render_partial_object(template, options) : template.render(self, locals) @_content_for[:layout] = content if layout @_layout = layout.identifier logger.info("Rendering template within #{layout.inspect}") if logger - content = layout.render(self, locals) {|*name| _layout_for(*name) } + content = layout.render(self, locals) { |*name| _layout_for(*name) } end + content end end |