diff options
author | Jamis Buck <jamis@37signals.com> | 2005-09-01 21:51:27 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-09-01 21:51:27 +0000 |
commit | e758c2e9db63d8b0a01c659a74e8f1dec22a72d0 (patch) | |
tree | cc713b2d4ac7b751e6c5ad4051b05f0f2ab5f83c /actionpack/lib/action_view | |
parent | 01af965a3e68f719fe9cfdce36a82ad8901fe7a7 (diff) | |
download | rails-e758c2e9db63d8b0a01c659a74e8f1dec22a72d0.tar.gz rails-e758c2e9db63d8b0a01c659a74e8f1dec22a72d0.tar.bz2 rails-e758c2e9db63d8b0a01c659a74e8f1dec22a72d0.zip |
Yield @content_for_ variables to templates #2058 [Sam Stephenson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2094 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/base.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 923a1c28da..fbc9a66a05 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -243,7 +243,9 @@ module ActionView #:nodoc: # Get the selector for this template and names, then call the method. selector = @@compiled_templates.selector(identifier, names) evaluate_assigns - send(selector, *params) + send(selector, *params) do |*name| + instance_variable_get "@content_for_#{name.first || 'layout'}" + end end def pick_template_extension(template_path)#:nodoc: |