Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit f07c26466645304a3b65dd630f575199baaa92ad 1 parent 9f466be
Ryan Bigg radar authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  promo/app/models/spree/promotion/rules/user.rb
2  promo/app/models/spree/promotion/rules/user.rb
View
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.