Permalink
Browse files

Fixed :_delete is now :_destroy in Rails 3.0

  • Loading branch information...
1 parent 48142a7 commit 5742a72b8a116e4f4e387ab345d62ac3215c3bba @mikel mikel committed Jan 24, 2010
Showing with 3 additions and 4 deletions.
  1. +3 −4 railties/guides/source/getting_started.textile
@@ -1218,7 +1218,7 @@ The +:allow_destroy+ option on the nested attribute declaration tells Rails to d
You'll also need to modify +views/posts/_form.html.erb+ to include the tags:
<erb>
-<% @post.tags.build if @post.tags.empty? %>
+<% @post.tags.build %>
<% form_for(@post) do |post_form| %>
<%= post_form.error_messages %>
@@ -1242,8 +1242,8 @@ You'll also need to modify +views/posts/_form.html.erb+ to include the tags:
</div>
<% unless tag_form.object.nil? || tag_form.object.new_record? %>
<div class="field">
- <%= tag_form.label :_delete, 'Remove:' %>
- <%= tag_form.check_box :_delete %>
+ <%= tag_form.label :_destroy, 'Remove:' %>
+ <%= tag_form.check_box :_destroy %>
</div>
<% end %>
<% end %>
@@ -1277,7 +1277,6 @@ Rails also comes with built-in help that you can generate using the rake command
h3. Changelog
"Lighthouse ticket":http://rails.lighthouseapp.com/projects/16213-rails-guides/tickets/2
-"Lighthouse ticket for accepts_nested_attributes_for bug":https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/3779
* January 24, 2010: Re-write for Rails 3.0 by "Mikel Lindsaar":credits:html#raasdnil
* July 18, 2009: Minor cleanup in anticipation of Rails 2.3.3 by "Mike Gunderloy":credits.html#mgunderloy

0 comments on commit 5742a72

Please sign in to comment.