Class: Product
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Product
- Defined in:
- app/models/product.rb
Instance Method Summary collapse
Methods included from SharedBehaviour::Deprecatable
#deprecate!, #deprecated?, included
Methods included from SharedBehaviour::Indestructable
Methods inherited from ApplicationRecord
alias_association, convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!
Methods included from Squishify
Instance Method Details
#display_name ⇒ Object
25 26 27 |
# File 'app/models/product.rb', line 25 def display_name deprecated? ? "#{name} (Deprecated #{deprecated_at.to_fs(:iso8601)})" : name end |
#stock_criteria ⇒ Object
21 22 23 |
# File 'app/models/product.rb', line 21 def stock_criteria product_criteria.active.stock.first end |