Sha256: 03263cc44deb522fc3839618db27168700fd565deeb6aa79087d01b65c965c5e

Contents?: true

Size: 276 Bytes

Versions: 32

Compression:

Stored size: 276 Bytes

Contents

module Spree
  class Role < Spree::Base
    has_many :role_users, class_name: 'Spree::RoleUser', dependent: :destroy
    has_many :users, through: :role_users, class_name: Spree.user_class.to_s

    validates :name, presence: true, uniqueness: { allow_blank: true }
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
spree_core-3.2.9 app/models/spree/role.rb
spree_core-3.1.14 app/models/spree/role.rb
spree_core-3.2.8 app/models/spree/role.rb
spree_core-3.1.13 app/models/spree/role.rb
spree_core-3.2.7 app/models/spree/role.rb
spree_core-3.1.12 app/models/spree/role.rb
spree_core-3.2.6 app/models/spree/role.rb
spree_core-3.1.11 app/models/spree/role.rb
spree_core-3.1.10 app/models/spree/role.rb
spree_core-3.2.5 app/models/spree/role.rb
spree_core-3.1.9 app/models/spree/role.rb
spree_core-3.2.4 app/models/spree/role.rb
spree_core-3.1.8 app/models/spree/role.rb
spree_core-3.1.7 app/models/spree/role.rb
spree_core-3.2.3 app/models/spree/role.rb
spree_core-3.2.2 app/models/spree/role.rb
spree_core-3.1.6 app/models/spree/role.rb
spree_core-3.1.5 app/models/spree/role.rb
spree_core-3.2.1 app/models/spree/role.rb
spree_core-3.2.0 app/models/spree/role.rb