From b441c5d191baf42f882f79e683c323d60d04b947 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Tue, 22 Dec 2015 09:46:33 +0900 Subject: do not use `div_for` in example [ci skip] `div_for` removed in 01e94ef --- actionview/lib/action_view/record_identifier.rb | 17 +++++++++-------- 1 file 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: # - #
- #
+ #
+ # + #
# # When +post+ is a persisted ActiveRecord::Base instance, the resulting HTML # is: # - #
- # What a wonderful world! - #
+ #
+ # + #
# # In both cases, the +id+ and +class+ of the wrapping DOM element are # automatically generated, following naming conventions encapsulated by the -- cgit v1.2.3