Sha256: e9590c6612fa00a4d5e3f33adffc61c5da3fdd0227a2477cdbe78dbc844eae60

Contents?: true

Size: 243 Bytes

Versions: 16

Compression:

Stored size: 243 Bytes

Contents

module Gaku
  class Department < ActiveRecord::Base
    has_many :specialties
    has_many :syllabuses
    has_many :exams

    translates :name

    validates :name, presence: true, uniqueness: true

    def to_s
      name
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
gaku_core-0.3.0 app/models/gaku/department.rb
gaku_core-0.3.0.pre.4 app/models/gaku/department.rb
gaku_core-0.3.0.pre.3 app/models/gaku/department.rb
gaku_core-0.3.0.pre.2 app/models/gaku/department.rb
gaku_core-0.3.0.pre.1 app/models/gaku/department.rb
gaku_core-0.3.0.pre.0 app/models/gaku/department.rb
gaku-0.2.4 core/app/models/gaku/department.rb
gaku_core-0.2.4 app/models/gaku/department.rb
gaku-0.2.3 core/app/models/gaku/department.rb
gaku_core-0.2.3 app/models/gaku/department.rb
gaku-0.2.2 core/app/models/gaku/department.rb
gaku_core-0.2.2 app/models/gaku/department.rb
gaku-0.2.1 core/app/models/gaku/department.rb
gaku_core-0.2.1 app/models/gaku/department.rb
gaku-0.2.0 core/app/models/gaku/department.rb
gaku_core-0.2.0 app/models/gaku/department.rb