Sha256: 249ea4de5ad0080b34d9c879abce6ea8fd62fce18c4a807e1512a09cf2a4a165

Contents?: true

Size: 387 Bytes

Versions: 1

Compression:

Stored size: 387 Bytes

Contents

# frozen_string_literal: true

# Class modeling Roles within the application
class Role < ActiveRecord::Base
  has_and_belongs_to_many :users

  validates :name,
            uniqueness: true,
            format: {
              with: /\A[a-zA-Z0-9._-]+\z/,
              message: 'Only letters, numbers, hyphens, ' \
              'underscores and periods are allowed'
            }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hydra-role-management-1.0.3 app/models/role.rb