This project is archived and is in readonly mode.
has_many : << method doesn't handle :conditions
-
Tarmo Tänav
- State changed from new to wontfix
- Tag changed from 2.1, activerecord, has_many to 2.1, activerecord, has_many
This will never happen, we can't start parsing arbitrary conditions, conditions are meant only as read-only restrictions on an association.
You can however use :before_add callbacks to restrict what can be added to the collection.
-
Jérôme
- Assigned user set to Tarmo Tänav
Sure, but in my example, the :before_add hook can only handle the Topic, not the Subscription. :(