diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-01-24 19:31:39 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-01-24 19:31:39 +1100 |
commit | 5742a72b8a116e4f4e387ab345d62ac3215c3bba (patch) | |
tree | 50b9fab400308924216478ef49d5e2dee798339b /railties | |
parent | 48142a704a00b8296bc26ae571ae430bf55b90a0 (diff) | |
download | rails-5742a72b8a116e4f4e387ab345d62ac3215c3bba.tar.gz rails-5742a72b8a116e4f4e387ab345d62ac3215c3bba.tar.bz2 rails-5742a72b8a116e4f4e387ab345d62ac3215c3bba.zip |
Fixed :_delete is now :_destroy in Rails 3.0
Diffstat (limited to 'railties')
-rw-r--r-- | railties/guides/source/getting_started.textile | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index 4d406c09da..2886df3b63 100644 --- a/railties/guides/source/getting_started.textile +++ b/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 |