Fix grammar for content_tag_for and div_for docs.
This commit is contained in:
parent
14157b779b
commit
0a2ea92efa
|
@ -18,7 +18,7 @@ module ActionView
|
||||||
# <div id="person_123" class="person foo"> Joe Bloggs </div>
|
# <div id="person_123" class="person foo"> Joe Bloggs </div>
|
||||||
#
|
#
|
||||||
# You can also pass an array of Active Record objects, which will then
|
# You can also pass an array of Active Record objects, which will then
|
||||||
# get iterates over and yield each record as an argument for the block.
|
# get iterated over and yield each record as an argument for the block.
|
||||||
# For example:
|
# For example:
|
||||||
#
|
#
|
||||||
# <%= div_for(@people, :class => "foo") do |person| %>
|
# <%= div_for(@people, :class => "foo") do |person| %>
|
||||||
|
@ -56,7 +56,7 @@ module ActionView
|
||||||
# <tr id="foo_person_123" class="person">...
|
# <tr id="foo_person_123" class="person">...
|
||||||
#
|
#
|
||||||
# You can also pass an array of objects which this method will loop through
|
# You can also pass an array of objects which this method will loop through
|
||||||
# and yield the current object to the supplied block, reduce the need for
|
# and yield the current object to the supplied block, reducing the need for
|
||||||
# having to iterate through the object (using <tt>each</tt>) beforehand.
|
# having to iterate through the object (using <tt>each</tt>) beforehand.
|
||||||
# For example (assuming @people is an array of Person objects):
|
# For example (assuming @people is an array of Person objects):
|
||||||
#
|
#
|
||||||
|
|
|
@ -494,7 +494,7 @@ Will generate this HTML output:
|
||||||
</tr>
|
</tr>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
You can pass a collection of Active Record objects. This method will loops through your objects and create a container for each of them. For example, given +@posts+ is an array of two +Post+ objects:
|
You can pass a collection of Active Record objects. This method will loop through your objects and create a container for each of them. For example, given +@posts+ is an array of two +Post+ objects:
|
||||||
|
|
||||||
<ruby>
|
<ruby>
|
||||||
<%= content_tag_for(:tr, @posts) do |post| %>
|
<%= content_tag_for(:tr, @posts) do |post| %>
|
||||||
|
|
Loading…
Reference in New Issue