#1021 ✓resolved
Arnaud D.

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

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages