Class: Promotion::Rules::User
- Inherits:
-
PromotionRule
- Object
- PromotionRule
- Promotion::Rules::User
- Defined in:
- app/models/promotion/rules/user.rb
Instance Method Summary collapse
Instance Method Details
#eligible?(order) ⇒ Boolean
5 6 7 |
# File 'app/models/promotion/rules/user.rb', line 5 def eligible?(order) users.none? or users.include?(order.user) end |
#user_ids_string ⇒ Object
9 10 11 |
# File 'app/models/promotion/rules/user.rb', line 9 def user_ids_string user_ids.join(',') end |
#user_ids_string=(s) ⇒ Object
13 14 15 |
# File 'app/models/promotion/rules/user.rb', line 13 def user_ids_string=(s) self.user_ids = s.to_s.split(',').map(&:strip) end |