Re: accepts_nested_attributes_for ignores reject_if option for destroy of nested resource
117 views
Skip to first unread message
svoop
unread,
Jul 5, 2012, 9:10:47 AM7/5/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rubyonra...@googlegroups.com
Extend "destroy_if" to accept a Proc which returns either true or false as well
Oops, that's wrong, I mean "extend the allow_destroy option" of course.
Not too many opinions thus far. :-) It basically boils down to this: Should the reject_if option only be relevant for creates and updates or for deletes as well?
I tend towards "yes", but a patch for this will change the behaviour of allow_destroy in conjunction with reject_if. Such an API change might cause headaches on existing applications. (A temporary warning if both options are set might be useful.)