find lets me specify SQL conditions like this:
Product.find :all, :conditions => “price > 100”
where price is a SQL column.
But in my Product model, price is actually a virtual attribute that’s calculated based on the the prices of its components. Is there a way to specify virtual attributes as part of a finder condition? Right now my only choice is to implement a method “find_all_expensive_products” in Product that loops through all the products returned by find :all and check for the virtual attribute one by one.