Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add attr_accessible for `user_ids_string` in user promotion rule

  • Loading branch information...
commit 8796502eba9a7cfbb40df4ebb98005b5059169c2 1 parent 8e72d68
@citrus citrus authored radar committed
Showing with 2 additions and 0 deletions.
  1. +2 −0  promo/app/models/spree/promotion/rules/user.rb
View
2  promo/app/models/spree/promotion/rules/user.rb
@@ -3,6 +3,8 @@ class Promotion::Rules::User < PromotionRule
belongs_to :user, :class_name => Spree.user_class.to_s
has_and_belongs_to_many :users, :class_name => Spree.user_class.to_s, :join_table => 'spree_promotion_rules_users', :foreign_key => 'promotion_rule_id'
+ attr_accessible :user_ids_string
+
def eligible?(order, options = {})
users.none? or users.include?(order.user)
end
Please sign in to comment.
Something went wrong with that request. Please try again.