Browse files

Trivial doc update on nested attributes delete renaming

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent 715b34f commit bf563bd90422a77fb07f2b7261d60c956c485fe8 @dudleyf dudleyf committed with josevalim Mar 29, 2010
View
8 actionpack/lib/action_view/helpers/form_helper.rb
@@ -391,15 +391,15 @@ def apply_form_for_options!(object_or_array, options) #:nodoc:
# accepts_nested_attributes_for :address, :allow_destroy => true
# end
#
- # Now, when you use a form element with the <tt>_delete</tt> parameter,
+ # Now, when you use a form element with the <tt>_destroy</tt> parameter,
# with a value that evaluates to +true+, you will destroy the associated
# model (eg. 1, '1', true, or 'true'):
#
# <% form_for @person, :url => { :action => "update" } do |person_form| %>
# ...
# <% person_form.fields_for :address do |address_fields| %>
# ...
- # Delete: <%= address_fields.check_box :_delete %>
+ # Delete: <%= address_fields.check_box :_destroy %>
# <% end %>
# <% end %>
#
@@ -472,14 +472,14 @@ def apply_form_for_options!(object_or_array, options) #:nodoc:
# end
#
# This will allow you to specify which models to destroy in the
- # attributes hash by adding a form element for the <tt>_delete</tt>
+ # attributes hash by adding a form element for the <tt>_destroy</tt>
# parameter with a value that evaluates to +true+
# (eg. 1, '1', true, or 'true'):
#
# <% form_for @person, :url => { :action => "update" } do |person_form| %>
# ...
# <% person_form.fields_for :projects do |project_fields| %>
- # Delete: <%= project_fields.check_box :_delete %>
+ # Delete: <%= project_fields.check_box :_destroy %>
# <% end %>
# <% end %>
def fields_for(record_or_name_or_array, *args, &block)
View
4 railties/guides/source/getting_started.textile
@@ -1255,8 +1255,8 @@ You'll also need to modify +views/posts/_form.html.erb+ to include the tags:
</p>
<% unless tag_form.object.nil? || tag_form.object.new_record? %>
<p>
- <%= tag_form.label :_delete, 'Remove:' %>
- <%= tag_form.check_box :_delete %>
+ <%= tag_form.label :_destroy, 'Remove:' %>
+ <%= tag_form.check_box :_destroy %>
</p>
<% end %>
<% end %>

0 comments on commit bf563bd

Please sign in to comment.