Sha256: ea430b9263ee1ecaaf95173e80ba2ac0e7b4c1e9955a0a056cbb76630ebade93
Contents?: true
Size: 529 Bytes
Versions: 10
Compression:
Stored size: 529 Bytes
Contents
module Gaku class SemesterClassGroup < ActiveRecord::Base belongs_to :semester belongs_to :class_group validates :class_group_id, presence: true validates :semester_id, presence: true, uniqueness: { scope: :class_group_id, message: I18n.t(:'semester_class_group.uniqueness') } def self.group_by_semester all.includes([:semester, :class_group]).group_by(&:semester_id) end end end
Version data entries
10 entries across 10 versions & 2 rubygems