Displaying 1 result from an estimated 1 matches for "rated_at_or_above_threshold".
2007 Jan 31
1
help with extensions
...e the conditions.
class User
has_many :reading
has_many :articles, :through => :readings do
def rated_at_or_above(rating) # this is the finder
method in AWD -- works fine
find :all, :conditions => [''rating >= ?'', rating]
end
def rated_at_or_above_threshold # but can I do something
like this? (doesn''t work)
find :all, :conditions => [''rating >= ?'', user.threshold] #
NoMethodError: undefined method user for Article:class
end
end
end
How would I implement this? As the error suggests, the pro...