Class: Refinery::Products::Product
- Inherits:
-
Core::BaseModel
- Object
- Core::BaseModel
- Refinery::Products::Product
- Defined in:
- app/models/refinery/products/product.rb
Class Method Summary collapse
-
.digi_select_list ⇒ Object
———————————————————————– digi_select_list – returns an html select list of prods w/o downloads ———————————————————————–.
-
.select_list ⇒ Object
———————————————————————– select_list – returns an html select list suitable for selecting a product ———————————————————————–.
Class Method Details
.digi_select_list ⇒ Object
digi_select_list – returns an html select list of prods w/o downloads
27 28 29 30 |
# File 'app/models/refinery/products/product.rb', line 27 def self.digi_select_list() [ ["none selected yet", nil] ] + includes(:digidownload).where( :refinery_digidownloads => { :product_id => nil } ).all.map{ |x| [x.name, x.id] } end |
.select_list ⇒ Object
select_list – returns an html select list suitable for selecting a product
19 20 21 |
# File 'app/models/refinery/products/product.rb', line 19 def self.select_list() all.map{ |x| [x.name, x.id] } end |