Class: Wco::Product
- Inherits:
-
Object
- Object
- Wco::Product
- 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
.list ⇒ Object
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_s ⇒ Object
16 17 18 |
# File 'app/models/wco/product.rb', line 16 def to_s name end |