module JamRuby
  class TeacherSubject < ActiveRecord::Base
    self.table_name = "teachers_subjects"

    belongs_to :teacher, class_name: "JamRuby::Teacher"
    belongs_to :subject, class_name: "JamRuby::Subject"

    validates :teacher, presence:true
    validates :subject, presence: true
  end
end
