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.1.0.beta1 app/models/spree/role.rb