Conditions within has_many through
Reported by Arnaud D. | September 27th, 2012 @ 11:13 PM
Hi,
having a condition in an has_many through association, I receive
an error while saving the model saying:
undefined method `%' for [["categories.frame=?", 1]]:Array
And in fact, the satinization.rb in activerecord cannot analyze this array of array of conditions.
The issue comes from accessible_association.rb in
hobo/lib/hobo/model.
Line 13, we do
conditions =
association.proxy_association.reflection.conditions
and we should do:
conditions =
association.proxy_association.reflection.options[:conditions]
Regards,
Arnaud Doyen
Comments and changes to this ticket
-
Bryan Larsen September 28th, 2012 @ 01:43 PM
- State changed from new to resolved
tests passed, pull request merged.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป