aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/render
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2009-03-20 16:13:13 -0700
committerYehuda Katz <wycats@gmail.com>2009-03-23 10:23:14 -0700
commit81e814adfad6d4bba1af5f70a5a409f6d71f8f6c (patch)
treea1dfa746191d7509f6f695b2e99d5a7f79278b91 /actionpack/lib/action_view/render
parent90c079a7814a9a996c8cbe353015c080fafce2bc (diff)
downloadrails-81e814adfad6d4bba1af5f70a5a409f6d71f8f6c.tar.gz
rails-81e814adfad6d4bba1af5f70a5a409f6d71f8f6c.tar.bz2
rails-81e814adfad6d4bba1af5f70a5a409f6d71f8f6c.zip
Working on being able to render :text with layouts
Diffstat (limited to 'actionpack/lib/action_view/render')
-rw-r--r--actionpack/lib/action_view/render/rendering.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/render/rendering.rb b/actionpack/lib/action_view/render/rendering.rb
index a02c058725..68b343de77 100644
--- a/actionpack/lib/action_view/render/rendering.rb
+++ b/actionpack/lib/action_view/render/rendering.rb
@@ -62,20 +62,18 @@ module ActionView
end
def _render_template(template, local_assigns = {})
- template.compile(local_assigns)
-
@_render_stack.push(template)
_evaluate_assigns_and_ivars
_set_controller_content_type(template.mime_type) if template.respond_to?(:mime_type)
- result = send(template.method_name(local_assigns), local_assigns) do |*names|
+ result = template.render(self, local_assigns) do |*names|
if !instance_variable_defined?(:"@content_for_#{names.first}") &&
instance_variable_defined?(:@_proc_for_layout) && (proc = @_proc_for_layout)
capture(*names, &proc)
elsif instance_variable_defined?(ivar = :"@content_for_#{names.first || :layout}")
instance_variable_get(ivar)
- end
+ end
end
@_render_stack.pop