James Byrne wrote: > Robert Walker wrote: >> I think a better question is, "Why isn't there a :dependent => :deny >> option?" > > Because Josh said no. > > http://dev.rubyonrails.org/ticket/3837
That's a good answer, I'll accept that. Ar Chron wrote: > we already have a :before_destroy callback to serve your purpose, which > is far more powerful -- not every case is as simple as "Don't delete if >there are any employees" This also makes sense. Especially in the context of Rails. Having a "deny delete" or "protect from delete" as implemented in other frameworks I've used also makes sense in their own right. But, it is true that this is more a validation issue than an association issue, so also makes sense to be implemented in the context of validation. The line can get a bit fuzzy when talking about "relational integrity" since it takes both association manipulation (cascade delete and nullify) and validation (deny delete) in order to fully implement. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

