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

Version Path
gaku-0.1.1 core/app/models/gaku/extracurricular_activity_enrollment.rb
gaku_core-0.1.1 app/models/gaku/extracurricular_activity_enrollment.rb
gaku-0.1.0 core/app/models/gaku/extracurricular_activity_enrollment.rb
gaku_core-0.1.0 app/models/gaku/extracurricular_activity_enrollment.rb
gaku_core-0.0.3 app/models/gaku/extracurricular_activity_enrollment.rb
gaku-0.0.3 core/app/models/gaku/extracurricular_activity_enrollment.rb
gaku-0.0.2 core/app/models/gaku/extracurricular_activity_enrollment.rb
gaku_core-0.0.2 app/models/gaku/extracurricular_activity_enrollment.rb
gaku-0.0.1 core/app/models/gaku/extracurricular_activity_enrollment.rb
gaku_core-0.0.1 app/models/gaku/extracurricular_activity_enrollment.rb