Class: DataStore::Category
- Inherits:
-
Object
- Object
- DataStore::Category
- Includes:
- DataMapper::Resource
- Defined in:
- lib/flexquery_datastore/models/Category.rb
Instance Method Summary collapse
Instance Method Details
#products ⇒ Object
16 17 18 19 20 21 |
# File 'lib/flexquery_datastore/models/Category.rb', line 16 def products product_ids = repository.adapter .select('SELECT desc1 FROM rp8inventoryitems WHERE dcs = ?', self.dcs) .uniq DataStore::Product.all(desc1: product_ids, unique: true) end |
#variants ⇒ Object
23 24 25 |
# File 'lib/flexquery_datastore/models/Category.rb', line 23 def variants DataStore::Variant.all(dcs: self.dcs) end |