Open ryanjm opened 10 years ago
I am reporting the same issue. To fix this immediately this should helps:
<%= f.link_to_remove "Remove the location", class: 'btn btn-danger', data: {association: 'location'} %>
Just add
data: {association: 'location'}
where "location" is name of your nested form.
Thanks for the fix it works like a charm !
I am working on a project that is using a double nested form. Add/remove works fine, as expected. But the remove link doesn't get the
data-association
that it should.According to the specs this should work. I'm not sure if it is because it is a
has_one
association instead of ahas_many
.In the code I'm not really sure where
object_name
is coming from so I'm not sure where to look to solve the issue.Are we missing something or is this a bug?