Class: SolidusFriendlyPromotions::Conditions::User
Instance Method Summary
collapse
#applicable?, #level
#applicable?, #eligibility_errors, #level, #to_partial_path
Instance Method Details
#eligible?(order, _options = {}) ⇒ Boolean
18
19
20
|
# File 'app/models/solidus_friendly_promotions/conditions/user.rb', line 18
def eligible?(order, _options = {})
users.include?(order.user)
end
|
#preload_relations ⇒ Object
14
15
16
|
# File 'app/models/solidus_friendly_promotions/conditions/user.rb', line 14
def preload_relations
[:users]
end
|
#updateable? ⇒ Boolean
30
31
32
|
# File 'app/models/solidus_friendly_promotions/conditions/user.rb', line 30
def updateable?
true
end
|
#user_ids_string ⇒ Object
22
23
24
|
# File 'app/models/solidus_friendly_promotions/conditions/user.rb', line 22
def user_ids_string
user_ids.join(",")
end
|
#user_ids_string=(user_ids) ⇒ Object
26
27
28
|
# File 'app/models/solidus_friendly_promotions/conditions/user.rb', line 26
def user_ids_string=(user_ids)
self.user_ids = user_ids.to_s.split(",").map(&:strip)
end
|