This project is archived and is in readonly mode.

#3779 ✓resolved
Mikel Lindsaar

accepts_nested_attributes_for not working per docs

Reported by Mikel Lindsaar | January 24th, 2010 @ 04:46 AM | in 3.0.2

I am updating the Rails Guides and found that accepts_nested_attributes_for does not seem to be working per documentation.

On Rails master cloned and vendor'd as of 24 Jan, 2010, Ruby 1.8.7

The gist of the matter is at: http://gist.github.com/284996

accepts_nested_attributes does not seem to be working per docs on Rails 3. The following code snippets produce:

 undefined method `_delete' for #<Tag:0x1034414a8>

when you try and view a post that has a tag using the usual idiom:

  <div class="field">
    <%= tag_form.label :_delete, 'Remove:' %>
    <%= tag_form.check_box :_delete %>
  </div>

This does work as advertised on Rails 2.3.5

You can clone the whole Rails 3.0 app just waiting for your gem bundle at

github.com/mikel/getting-started-code

Assigning it to Jose because you touched the code last :)

Mikel

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages