Sha256: 84851b644d9e58adb9ab997dede40f4d47cf40869504f887217e1b39299f0860
Contents?: true
Size: 526 Bytes
Versions: 10
Compression:
Stored size: 526 Bytes
Contents
module Gaku class ExtracurricularActivityEnrollment < ActiveRecord::Base belongs_to :extracurricular_activity belongs_to :student has_many :school_roles, as: :school_rolable validates :student_id, presence: true, uniqueness: { scope: :extracurricular_activity_id, message: I18n.t(:'extracurricular_activity.already_enrolled') } validates :extracurricular_activity_id, presence: true end end
Version data entries
10 entries across 10 versions & 2 rubygems