module Sis module Core class Curriculum < ApplicationRecord belongs_to :programme belongs_to :programme_level validates :compulsory_course_credit_hours, :elective_course_credit_hours, :thesis_hour, :project_hour, presence: true delegate(:name, to: :programme, prefix: true) delegate(:name, to: :programme_level, prefix: true) def name "#{programme.name} #{programme_level.name}" end end end end