-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
class Shadow has_and_belongs_to_many :interests, :class_name => 'Product' end class Product has_and_belongs_to_many :viewers, :class_name => 'Shadow' end # This works Shadow.where(:created_at.lte => Time.now).count => 502 # This doesn't Product.first.viewers.where(:created_at.lte => Time.now).count => 0
Did I set up the association incorrectly? I'm confused. It seems that I can't get any sort of where() queries working with associations.
mongoid (2.0.2)
rails (3.1.0.rc1)