Sha256: be11c050321052a1b3f0f398386d45a5b782493fbd9cd7e044c2c9f980dc6ac0

Contents?: true

Size: 293 Bytes

Versions: 8

Compression:

Stored size: 293 Bytes

Contents

module Renalware
  class Role < ApplicationRecord
    ROLES = %i(devops super_admin admin clinician read_only).freeze

    has_and_belongs_to_many :users

    validates_uniqueness_of :name

    def self.fetch(ids)
      return none if Array.wrap(ids).empty?

      find(ids)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.beta11 app/models/renalware/role.rb
renalware-core-2.0.0.pre.beta10 app/models/renalware/role.rb
renalware-core-2.0.0.pre.beta9 app/models/renalware/role.rb
renalware-core-2.0.0.pre.beta8 app/models/renalware/role.rb
renalware-core-2.0.0.pre.beta7 app/models/renalware/role.rb
renalware-core-2.0.0.pre.beta6 app/models/renalware/role.rb
renalware-core-2.0.0.pre.beta5 app/models/renalware/role.rb
renalware-core-2.0.0.pre.beta4 app/models/renalware/role.rb