Browse files

Use Spree.user_class in Spree::Promotion::Rules::User

  • Loading branch information...
1 parent 9f466be commit f07c26466645304a3b65dd630f575199baaa92ad @radar radar committed May 10, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 promo/app/models/spree/promotion/rules/user.rb
View
2 promo/app/models/spree/promotion/rules/user.rb
@@ -5,7 +5,7 @@ class User < PromotionRule
attr_accessible :user_ids_string
belongs_to :user, :class_name => Spree.user_class.to_s
- has_and_belongs_to_many :users, :class_name => '::Spree::User', :join_table => 'spree_promotion_rules_users', :foreign_key => 'promotion_rule_id'
+ has_and_belongs_to_many :users, :class_name => Spree.user_class.to_s, :join_table => 'spree_promotion_rules_users', :foreign_key => 'promotion_rule_id'
def eligible?(order, options = {})
users.none? or users.include?(order.user)

0 comments on commit f07c264

Please sign in to comment.