Sha256: 6444015463543abd46637eae9b94edf73f7ddc35a35c39baec7964103fa1fb55

Contents?: true

Size: 215 Bytes

Versions: 41

Compression:

Stored size: 215 Bytes

Contents

module Spree
  class Role < Spree::Base
    has_many :role_users, class_name: "Spree::RoleUser", dependent: :destroy
    has_many :users, through: :role_users

    def admin?
      name == "admin"
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
solidus_core-1.4.0.rc1 app/models/spree/role.rb
solidus_core-2.0.0.beta1 app/models/spree/role.rb
solidus_core-1.4.0.beta1 app/models/spree/role.rb
solidus_core-1.3.1 app/models/spree/role.rb
solidus_core-1.3.0 app/models/spree/role.rb
solidus_core-1.3.0.rc2 app/models/spree/role.rb
solidus_core-1.3.0.rc1 app/models/spree/role.rb
solidus_core-1.3.0.beta1 app/models/spree/role.rb
solidus_core-1.2.2 app/models/spree/role.rb
solidus_core-1.2.1 app/models/spree/role.rb
solidus_core-1.1.3 app/models/spree/role.rb
solidus_core-1.2.0 app/models/spree/role.rb
solidus_core-1.2.0.rc2 app/models/spree/role.rb
solidus_core-1.1.2 app/models/spree/role.rb
solidus_core-1.2.0.rc1 app/models/spree/role.rb
solidus_core-1.2.0.beta1 app/models/spree/role.rb
solidus_core-1.1.1 app/models/spree/role.rb
solidus_core-1.1.0 app/models/spree/role.rb
solidus_core-1.1.0.pre2 app/models/spree/role.rb
solidus_core-1.1.0.pre1 app/models/spree/role.rb