Class: SpreeCmCommissioner::Stop
- Inherits:
-
Place
- Object
- ApplicationRecord
- Place
- SpreeCmCommissioner::Stop
show all
- Defined in:
- app/models/spree_cm_commissioner/stop.rb
Instance Method Summary
collapse
Methods inherited from Place
#full_path_name, #path_ids, ransackable_attributes, #validate_lat?, #validate_lon?
Instance Method Details
#add_to_option_value ⇒ Object
15
16
17
18
19
20
21
|
# File 'app/models/spree_cm_commissioner/stop.rb', line 15
def add_to_option_value
origin = Spree::OptionType.find_by(attr_type: 'origin')&.id
destination = Spree::OptionType.find_by(attr_type: 'destination')&.id
Spree::OptionValue.create(option_type_id: origin, name: name, presentation: id)
Spree::OptionValue.create(option_type_id: destination, name: name, presentation: id)
end
|
#validate_reference? ⇒ Boolean
11
12
13
|
# File 'app/models/spree_cm_commissioner/stop.rb', line 11
def validate_reference?
false
end
|