| Class | Product |
| In: |
app/models/product.rb
|
| Parent: | ActiveRecord::Base |
A Product is something we can sell (but only if we’re passed its date_available attribute).
Return a list of products we can sell (which means they have to be available). Show the most recently available first.
# File app/models/product.rb, line 16
16: def self.salable_items
17: find(:all,
18: :conditions => "date_available <= now()",
19: :order => "date_available desc")
20: end