Sha256: 9f436c111962d81545229a6824f75e97041bc8e5cc448d61f1fa0587dd35e5b9
Contents?: true
Size: 427 Bytes
Versions: 6
Compression:
Stored size: 427 Bytes
Contents
module Gaku class StudentSpecialty < ActiveRecord::Base belongs_to :specialty, required: false belongs_to :student, required: false validates :specialty_id, presence: true validates :student_id, presence: true, uniqueness: { scope: :specialty_id, message: I18n.t(:'specialty.already_added') } scope :ordered, -> { order('major desc') } end end
Version data entries
6 entries across 6 versions & 1 rubygems