ryanb / nested_form

Rails plugin to conveniently handle multiple models in a single form.
MIT License
1.79k stars 505 forks source link

Can't delete images with Rails 4 RC1 and Carrierwave #265

Closed firedev closed 11 years ago

firedev commented 11 years ago

This ticket is related to https://github.com/ryanb/nested_form/issues/249 and https://github.com/jnicklas/carrierwave/issues/1022 which demonstratу empty images being added every time you save the form.

But there is a new issue with Rails 4 RC1. You can't delete an attachment.

Test app:

https://github.com/firedev/cw_nf_rails4

lest commented 11 years ago

You need to add id to this list. With this and your reject_if code everything works well.

firedev commented 11 years ago

Ah of course, thanks you! Silly of me.

maxwellE commented 11 years ago

Ran into this same issue today and adding "id" to the strong parameters worked. This should be documented in the gem Readme.