Sha256: 39f73a5d80b1dbe4168630138fd5b1db6714cb64869336a1b57318c0c123403e

Contents?: true

Size: 291 Bytes

Versions: 14

Compression:

Stored size: 291 Bytes

Contents

# frozen_string_literal: true

module Spree
  class RoleUser < Spree::Base
    self.table_name = "spree_roles_users"
    belongs_to :role, class_name: "Spree::Role"
    belongs_to :user, class_name: Spree::UserClassHandle.new

    validates_uniqueness_of :role_id, scope: :user_id
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
solidus_core_devise_token_auth-2.8.0.alpha.14 app/models/spree/role_user.rb
solidus_core_devise_token_auth-2.8.0.alpha.13 app/models/spree/role_user.rb
solidus_core_devise_token_auth-2.8.0.alpha.12 app/models/spree/role_user.rb
solidus_core_devise_token_auth-2.8.0.alpha.11 app/models/spree/role_user.rb
solidus_core_devise_token_auth-2.8.0.alpha.10 app/models/spree/role_user.rb
solidus_core_devise_token_auth-2.8.0.alpha.9 app/models/spree/role_user.rb
solidus_core_devise_token_auth-2.8.0.alpha.8 app/models/spree/role_user.rb
solidus_core_devise_token_auth-2.8.0.alpha.7 app/models/spree/role_user.rb
solidus_core_devise_token_auth-2.8.0.alpha.6 app/models/spree/role_user.rb
solidus_core_devise_token_auth-2.8.0.alpha.5 app/models/spree/role_user.rb
solidus_core_devise_token_auth-2.8.0.alpha.4 app/models/spree/role_user.rb
solidus_core_devise_token_auth-2.8.0.alpha.3 app/models/spree/role_user.rb
solidus_core_devise_token_auth-2.8.0.alpha.1 app/models/spree/role_user.rb
solidus_core_devise_token_auth-2.8.0.alpha.0 app/models/spree/role_user.rb