search for: chosen_answ

Displaying 1 result from an estimated 1 matches for "chosen_answ".

2006 Apr 03
0
with_scope used in a has_many :through model
Hi there, I have something like the following: class Person < AR:B ... ... has_many :votes has_many :chosen_answers, :through => :votes, :source => :answer, :select => ''DISTINCT answers.*'' do def my_answers(whodunnit) chosen_answers.with_scope(:find => { :conditions => [ "votes.created_by=?", whodunnit ] }) do chosen_answers.find :all end end end I...