Permalink
Browse files

Whitespace

  • Loading branch information...
1 parent d94ba11 commit 606e950ccbd02a10f724c73543575a2a4e1ed8cb @wycats wycats committed Aug 7, 2009
Showing with 7 additions and 7 deletions.
  1. +7 −7 actionpack/lib/action_view/render/rendering.rb
@@ -16,16 +16,16 @@ def render(options = {}, locals = {}, &block) #:nodoc:
_render_partial(:partial => options, :locals => locals || {})
when Hash
layout = options[:layout]
-
+
if block_given?
return concat(_render_partial(options.merge(:partial => layout), &block))
elsif options.key?(:partial)
layout = _pick_partial_template(layout) if layout
return _render_content(_render_partial(options), layout, options[:locals])
end
-
+
layout = find_by_parts(layout, {:formats => formats}) if layout
-
+
if file = options[:file]
template = find_by_parts(file, {:formats => formats})
_render_template(template, layout, :locals => options[:locals] || {})
@@ -38,17 +38,17 @@ def render(options = {}, locals = {}, &block) #:nodoc:
update_page(&block)
end
end
-
+
def _render_content(content, layout, locals)
return content unless layout
-
+
locals ||= {}
if controller && layout
@_layout = layout.identifier
logger.info("Rendering template within #{layout.identifier}") if logger
end
-
+
begin
old_content, @_content_for[:layout] = @_content_for[:layout], content
@@ -161,7 +161,7 @@ def _render_template(template, layout = nil, options = {}, partial = nil)
else
_render_single_template(template, locals)
end
-
+
_render_content(content, layout, locals)
end
end

0 comments on commit 606e950

Please sign in to comment.