Sha256: 0f142e131cd50c6886b40df5537ce43db267b97376f096f7d3873a17391cdfa5
Contents?: true
Size: 293 Bytes
Versions: 16
Compression:
Stored size: 293 Bytes
Contents
module Gaku class SemesterAttendance < ActiveRecord::Base belongs_to :student belongs_to :semester def self.grouped_for_table all.group_by(&:student_id).map do |k, v| [k, v.group_by(&:semester_id).map {|x,y| [x, y.first]}.to_h ] end.to_h end end end
Version data entries
16 entries across 16 versions & 2 rubygems