Sha256: fc40bff07ab6fa7e3b24e1fddfa7c4de51aec5a0b9267d19c4aa20203719bd99

Contents?: true

Size: 213 Bytes

Versions: 10

Compression:

Stored size: 213 Bytes

Contents

module Gaku
  class Role < ActiveRecord::Base

    has_many :user_roles
    has_many :users, through: :user_roles

    validates :name, presence: true, uniqueness: true

    def to_s
      name
    end

  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
gaku-0.1.1 core/app/models/gaku/role.rb
gaku_core-0.1.1 app/models/gaku/role.rb
gaku-0.1.0 core/app/models/gaku/role.rb
gaku_core-0.1.0 app/models/gaku/role.rb
gaku_core-0.0.3 app/models/gaku/role.rb
gaku-0.0.3 core/app/models/gaku/role.rb
gaku-0.0.2 core/app/models/gaku/role.rb
gaku_core-0.0.2 app/models/gaku/role.rb
gaku-0.0.1 core/app/models/gaku/role.rb
gaku_core-0.0.1 app/models/gaku/role.rb