Sha256: e4666ce2710abeac315b5f900538821dea5ce3a677eb1ff72db3ecec61e16862

Contents?: true

Size: 442 Bytes

Versions: 10

Compression:

Stored size: 442 Bytes

Contents

module Gaku
  class Syllabus < ActiveRecord::Base
    include Notes

    has_many :courses
    has_many :assignments
    has_many :lesson_plans

    has_many :programs, class_name: 'Gaku::ProgramSyllabus'

    has_many :exam_syllabuses, dependent: :destroy
    has_many :exams, through: :exam_syllabuses

    belongs_to :department

    accepts_nested_attributes_for :exams, :assignments

    validates :name, :code, presence: true
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
gaku-0.2.4 core/app/models/gaku/syllabus.rb
gaku_core-0.2.4 app/models/gaku/syllabus.rb
gaku-0.2.3 core/app/models/gaku/syllabus.rb
gaku_core-0.2.3 app/models/gaku/syllabus.rb
gaku-0.2.2 core/app/models/gaku/syllabus.rb
gaku_core-0.2.2 app/models/gaku/syllabus.rb
gaku-0.2.1 core/app/models/gaku/syllabus.rb
gaku_core-0.2.1 app/models/gaku/syllabus.rb
gaku-0.2.0 core/app/models/gaku/syllabus.rb
gaku_core-0.2.0 app/models/gaku/syllabus.rb