Sha256: 54ece74c03b1e9af717cd0275c22ccca943196e81521478d5cb6f8de189d5c24

Contents?: true

Size: 247 Bytes

Versions: 8

Compression:

Stored size: 247 Bytes

Contents

# frozen_string_literal: true
require 'proxes/models/base'

module ProxES
  class Role < Base
    many_to_many :users
    one_to_many :permissions

    def validate
      validates_presence [:name]
      validates_unique [:name]
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
proxes-0.4.0 lib/proxes/models/role.rb
proxes-0.3.6 lib/proxes/models/role.rb
proxes-0.3.5 lib/proxes/models/role.rb
proxes-0.3.3 lib/proxes/models/role.rb
proxes-0.3.2 lib/proxes/models/role.rb
proxes-0.3.1 lib/proxes/models/role.rb
proxes-0.3.0 lib/proxes/models/role.rb
proxes-0.2.0 lib/proxes/models/role.rb