As per
http://rails.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html
Possible callbacks are: before_add, after_add, before_remove and
after_remove.
Should any of the before_add callbacks throw an exception, the
object does not get added to the collection. Same with the
before_remove callbacks; if an exception is thrown the object doesn‘t
get removed.
However, when the add fails due to a before_add violation, the
exception thrown just blows up the whole stack. It doesn’t get caught
and turned into a Validation error on the object.
Is there a standard pattern for handling this?
Thanks,
-cpr