Sha256: 2cb9fb3ab4d2cb94812043ef05682beffccd3b2e846f3fb475a4c8658a2f93f2

Contents?: true

Size: 354 Bytes

Versions: 10

Compression:

Stored size: 354 Bytes

Contents

module Gaku
  class Specialty < ActiveRecord::Base
    has_many :student_specialties
    has_many :students, through: :student_specialties

    has_many :program_specialties
    has_many :programs, through: :program_specialties

    belongs_to :department

    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.2.4 core/app/models/gaku/specialty.rb
gaku_core-0.2.4 app/models/gaku/specialty.rb
gaku-0.2.3 core/app/models/gaku/specialty.rb
gaku_core-0.2.3 app/models/gaku/specialty.rb
gaku-0.2.2 core/app/models/gaku/specialty.rb
gaku_core-0.2.2 app/models/gaku/specialty.rb
gaku-0.2.1 core/app/models/gaku/specialty.rb
gaku_core-0.2.1 app/models/gaku/specialty.rb
gaku-0.2.0 core/app/models/gaku/specialty.rb
gaku_core-0.2.0 app/models/gaku/specialty.rb