Sha256: d45ea6794eec25019c31d77b7a4290a229638b1cd55861202a698f433d6e03bb
Contents?: true
Size: 303 Bytes
Versions: 82
Compression:
Stored size: 303 Bytes
Contents
# frozen_string_literal: true module Spree class Role < Spree::Base has_many :role_users, class_name: "Spree::RoleUser", dependent: :destroy has_many :users, through: :role_users validates_uniqueness_of :name, case_sensitive: true def admin? name == "admin" end end end
Version data entries
82 entries across 82 versions & 1 rubygems