```ruby
module Spree
  User.class_eval do
    scope :dibs_referrers, lambda { includes(:roles).where("#{::Spree::Role.table_name}.name" => "dibs_referral") }
    has_many :dibs_referrals, class_name: '::Spree::Order', uniq: true
  end
end
```

Fix dibs_referrals scope on user
user
```ruby
module Spree
  User.class_eval do
    scope :dibs_referrers, lambda { includes(:roles).where("#{::Spree::Role.table_name}.name" => "dibs_referral") }
    has_many :dibs_referrals, class_name: '::Spree::Order', foreign_key: 'dibs_referral_id', uniq: true
  end
end
```
assistant