Is there anyway I can prevent the collection<<(object, ...) and similar methods from adding objects that do not satisfy a specific condition. This would be similar to the :condition option on the has_and_belongs_to_many association.
I want to somehow place a condition or rewrite collection<<(object, ...) and similar methods so that when an "incompatible" object is attempted to be added to the collection, it returns false or throws an exception. Is this possible?
Thanks!