Protective is a small gem that protects your active records from being destroyed. Use it like protect_if :members, "Record has members and cannot be destroyed" This creates a before_destroy callback and adds the given message to the errors object of your record if the condition evaluates to #present?. Several callbacks may be declared. An additional method #protected? allows you to check beforehand. gem install protective Works for Active Record 2.3 and 3.0. Find the source at https://github.com/codez/protective Cheers Pascal -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.