aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/record_identifier.rb
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2015-12-22 09:46:33 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2015-12-22 14:36:24 +0900
commitb441c5d191baf42f882f79e683c323d60d04b947 (patch)
treef6635113de878b6a95ab1e22cddbd9395bbf61f4 /actionview/lib/action_view/record_identifier.rb
parent2de2263118d6763c11a02db05079a5b7a97a0a34 (diff)
downloadrails-b441c5d191baf42f882f79e683c323d60d04b947.tar.gz
rails-b441c5d191baf42f882f79e683c323d60d04b947.tar.bz2
rails-b441c5d191baf42f882f79e683c323d60d04b947.zip
do not use `div_for` in example [ci skip]
`div_for` removed in 01e94ef
Diffstat (limited to 'actionview/lib/action_view/record_identifier.rb')
-rw-r--r--actionview/lib/action_view/record_identifier.rb17
1 files changed, 9 insertions, 8 deletions
diff --git a/actionview/lib/action_view/record_identifier.rb b/actionview/lib/action_view/record_identifier.rb
index 4b44eb5520..4a2547b0fb 100644
--- a/actionview/lib/action_view/record_identifier.rb
+++ b/actionview/lib/action_view/record_identifier.rb
@@ -5,24 +5,25 @@ module ActionView
# RecordIdentifier encapsulates methods used by various ActionView helpers
# to associate records with DOM elements.
#
- # Consider for example the following code that displays the body of a post:
+ # Consider for example the following code that form of post:
#
- # <%= div_for(post) do %>
- # <%= post.body %>
+ # <%= form_for(post) do |f| %>
+ # <%= f.text_field :body %>
# <% end %>
#
# When +post+ is a new, unsaved ActiveRecord::Base instance, the resulting HTML
# is:
#
- # <div id="new_post" class="post">
- # </div>
+ # <form class="new_post" id="new_post" action="/posts" accept-charset="UTF-8" method="post">
+ # <input type="text" name="post[body]" id="post_body" />
+ # </form>
#
# When +post+ is a persisted ActiveRecord::Base instance, the resulting HTML
# is:
#
- # <div id="post_42" class="post">
- # What a wonderful world!
- # </div>
+ # <form class="edit_post" id="edit_post_42" action="/posts/42" accept-charset="UTF-8" method="post">
+ # <input type="text" value="What a wonderful world!" name="post[body]" id="post_body" />
+ # </form>
#
# In both cases, the +id+ and +class+ of the wrapping DOM element are
# automatically generated, following naming conventions encapsulated by the