mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Update doc (closes #11402)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9116 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
db3a60eb92
commit
b7aa223554
1 changed files with 1 additions and 2 deletions
|
@ -118,8 +118,7 @@ module ActionView
|
|||
# for elements that will be fragment cached.
|
||||
#
|
||||
# The deprecated way of accessing a content_for block is to use an instance variable
|
||||
# named <tt>@content_for_#{name_of_the_content_block}</tt>. So <tt><%= content_for :footer %></tt>
|
||||
# would be available as <tt><%= @content_for_footer %></tt>. The preferred usage is now
|
||||
# named <tt>@content_for_#{name_of_the_content_block}</tt>. The preferred usage is now
|
||||
# <tt><%= yield :footer %></tt>.
|
||||
def content_for(name, content = nil, &block)
|
||||
existing_content_for = instance_variable_get("@content_for_#{name}").to_s
|
||||
|
|
Loading…
Reference in a new issue