Class: Specify::Model::RecordSetItem
- Inherits:
-
Object
- Object
- Specify::Model::RecordSetItem
- Defined in:
- lib/specify/models/record_set_item.rb
Overview
RecordSetItems are orderd items in a Specify::Model::RecordSet.
A RecordSetItem represents instances of Specify::Model classes that are contained in a Specify::Model::RecordSet. The only class currently supported is Specify::Model::CollectionObject.
Instance Method Summary collapse
-
#before_create ⇒ Object
Sequel hook that sets #order_number for newly created records.
-
#order_number ⇒ Object
Returns the index (an Integer) that marks the position of
self
in a Specify::Model::RecordSet.
Instance Method Details
#before_create ⇒ Object
Sequel hook that sets #order_number for newly created records.
17 18 19 20 |
# File 'lib/specify/models/record_set_item.rb', line 17 def before_create self[:OrderNumber] = record_set.next_order_number super end |
#order_number ⇒ Object
Returns the index (an Integer) that marks the position of self
in a Specify::Model::RecordSet.
24 25 26 |
# File 'lib/specify/models/record_set_item.rb', line 24 def order_number self[:OrderNumber] end |