Sha256: 59b400656779386fc242b158b6ac7033c8218245e0ff6f392369b9bd18627102

Contents?: true

Size: 352 Bytes

Versions: 16

Compression:

Stored size: 352 Bytes

Contents

module Gaku
  class ExamSyllabus < ActiveRecord::Base
    belongs_to :syllabus, counter_cache: :exams_count
    belongs_to :exam

    validates :exam_id, presence: true

    validates :syllabus_id,
              presence: true,
              uniqueness: { scope: :exam_id,
                            message: I18n.t(:'exam.already_added') }
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

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