Open angelacode opened 13 years ago
Here>is the error I get from Console:
irb(main):002:0> Todo.joins(:contacts).where(:contacts => {:campaign_id => 1}).to_sql
NameError: undefined local variable or method `association' for #<ActiveRecord::Associations::ClassMethods::JoinDependency:0xb5433a54
Maybe something like that can fix your problem:
Todo.joins(:contacts).where(:contacts => [:campaign_id >> 1])
Disclaimer: I use MetaWhere.operator_overload!
Here is what I tried:
http://stackoverflow.com/questions/6207545/how-do-i-search-through-associations-in-metawhere-in-rails-3
I read the following documentation and tried to follow it:
http://metautonomo.us/projects/metawhere/
Thanks! Just trying to make the translation of everything in my app....