Class: Wco::Product

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, Mongoid::Paranoia, Mongoid::Timestamps
Defined in:
app/models/wco/product.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.listObject



19
20
21
# File 'app/models/wco/product.rb', line 19

def self.list
  [ [nil,nil] ] + self.all.order_by({ name: :asc }).map { |i| [i.name, i.id] }
end

Instance Method Details

#to_sObject



16
17
18
# File 'app/models/wco/product.rb', line 16

def to_s
  name
end