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
51 52 53 |
# File 'app/models/spree_cm_commissioner/voting_contestant.rb', line 51 def advanced_from_name advanced_from&.name end |
#advanced_to_name ⇒ Object
55 56 57 |
# File 'app/models/spree_cm_commissioner/voting_contestant.rb', line 55 def advanced_to_name advanced_to&.name end |
#special_rule_type ⇒ Object
47 48 49 |
# File 'app/models/spree_cm_commissioner/voting_contestant.rb', line 47 def special_rule_type (special_rules || {})['type'] end |
#special_rule_type=(value) ⇒ Object
43 44 45 |
# File 'app/models/spree_cm_commissioner/voting_contestant.rb', line 43 def special_rule_type=(value) self.special_rules = value.present? ? { 'type' => value } : {} end |