From c61d737a826f7c37312bf2697ef202c123d5e6e1 Mon Sep 17 00:00:00 2001
From: Dudley Flanders
Date: Mon, 29 Mar 2010 16:22:28 -0500
Subject: [PATCH] Trivial doc update on nested attributes delete renaming
---
actionpack/lib/action_view/helpers/form_helper.rb | 8 ++++----
railties/guides/source/getting_started.textile | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index e775f1d..c5b1a03 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -391,7 +391,7 @@ module ActionView
# accepts_nested_attributes_for :address, :allow_destroy => true
# end
#
- # Now, when you use a form element with the _delete parameter,
+ # Now, when you use a form element with the _destroy parameter,
# with a value that evaluates to +true+, you will destroy the associated
# model (eg. 1, '1', true, or 'true'):
#
@@ -399,7 +399,7 @@ module ActionView
# ...
# <% 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 @@ module ActionView
# end
#
# This will allow you to specify which models to destroy in the
- # attributes hash by adding a form element for the _delete
+ # attributes hash by adding a form element for the _destroy
# 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)
diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile
index 97f141b..6a19b04 100644
--- a/railties/guides/source/getting_started.textile
+++ b/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:
<% unless tag_form.object.nil? || tag_form.object.new_record? %>
- <%= tag_form.label :_delete, 'Remove:' %>
- <%= tag_form.check_box :_delete %>
+ <%= tag_form.label :_destroy, 'Remove:' %>
+ <%= tag_form.check_box :_destroy %>
<% end %>
<% end %>
--
1.6.6.1