Class: SpreeCmCommissioner::VotingContestant
- Defined in:
- app/models/spree_cm_commissioner/voting_contestant.rb
Instance Method Summary collapse
- #advanced_from_name ⇒ Object
- #advanced_to_name ⇒ Object
- #special_rule_type ⇒ Object
- #special_rule_type=(value) ⇒ Object
Instance Method Details
#advanced_from_name ⇒ Object
46 47 48 |
# File 'app/models/spree_cm_commissioner/voting_contestant.rb', line 46 def advanced_from_name advanced_from&.name end |
#advanced_to_name ⇒ Object
50 51 52 |
# File 'app/models/spree_cm_commissioner/voting_contestant.rb', line 50 def advanced_to_name advanced_to&.name end |
#special_rule_type ⇒ Object
42 43 44 |
# File 'app/models/spree_cm_commissioner/voting_contestant.rb', line 42 def special_rule_type (special_rules || {})['type'] end |
#special_rule_type=(value) ⇒ Object
38 39 40 |
# File 'app/models/spree_cm_commissioner/voting_contestant.rb', line 38 def special_rule_type=(value) self.special_rules = value.present? ? { 'type' => value } : {} end |