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
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.)

Opinions anyone?
 
Reply all
Reply to author
Forward
0 new messages