Class: Refinery::Products::Product

Inherits:
Core::BaseModel
  • Object
show all
Defined in:
app/models/refinery/products/product.rb

Class Method Summary collapse

Class Method Details

.digi_select_listObject


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_listObject


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