Sha256: 16b5a95e968014297143c4731bfd7a2550f47661cf5c1c738b42bb033b443407

Contents?: true

Size: 623 Bytes

Versions: 8

Compression:

Stored size: 623 Bytes

Contents

module Sis
  module Core
    class ExamSetup < ApplicationRecord
      belongs_to :application_setup
      has_many :exams

      validates :date, :hours, :venue, presence: true

      def name
        application_setup.academic_programme.name
      end

      delegate(:name, to: :application_setup, prefix: true, allow_nil: false)
      delegate(:programme_id, to: :application_setup, prefix: false, allow_nil: false)
      delegate(:programme_type_id, to: :application_setup, prefix: false, allow_nil: false)
      delegate(:programme_level_id, to: :application_setup, prefix: false, allow_nil: false)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sis_core-1.0.20 app/models/sis/core/exam_setup.rb
sis_core-1.0.19 app/models/sis/core/exam_setup.rb
sis_core-1.0.18 app/models/sis/core/exam_setup.rb
sis_core-1.0.17 app/models/sis/core/exam_setup.rb
sis_core-1.0.16 app/models/sis/core/exam_setup.rb
sis_core-1.0.15 app/models/sis/core/exam_setup.rb
sis_core-1.0.14 app/models/sis/core/exam_setup.rb
sis_core-1.0.13 app/models/sis/core/exam_setup.rb