# Nested forms and deleting/removing has\_many associations

**URL:** <https://www.ruby-forum.com/t/nested-forms-and-deleting-removing-has-many-associations/173072>\
**Category:** Rails\
**Created:** [August 1, 2009, 6:42pm UTC](https://www.ruby-forum.com/t/nested-forms-and-deleting-removing-has-many-associations/173072 "2009-08-01T18:42:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marmolin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71e660/32.png) [@marmolin](https://www.ruby-forum.com/u/marmolin)\
**Post date:** [August 1, 2009, 6:42pm UTC](https://www.ruby-forum.com/t/nested-forms-and-deleting-removing-has-many-associations/173072/1 "2009-08-01T18:42:51Z")

</div>

I am using nested forms on person model that has many pictures.  
I would like to allow the user to remove on or more of the associated  
pictures from the person using nested forms as suggested by Ryan B…  
However delete will delete the picture not remove the associatioon  
I can do it in the controller, but it should be done in the same way as  
delete is performed using attribute \_delete  
Anyone knowing if a \_remove attribute is implemented or know any other  
way to solve the problem (e.g. that could be a command  
allow\_remove=true)

Another problem is that it seems as nested forms do not validate the  
attributes of the associated object in this case picture.  
I have solved the problem by a fix in the controller, but it should  
really be a part the nested form

Anyone that has a solution to that problem?

Any comment would be much appreciated
