Sha256: edb7ecc9cc8e0366d4d6d9303c1f4393c8b2376f1c24d052433b49c0a3d53bab
Contents?: true
Size: 450 Bytes
Versions: 10
Compression:
Stored size: 450 Bytes
Contents
module Gaku class Guardian < ActiveRecord::Base include Person, Addresses, Contacts, Picture belongs_to :user has_many :student_guardians, dependent: :destroy has_many :students, through: :student_guardians after_create :reset_student_count after_destroy :reset_student_count private def reset_student_count students.each do |s| Student.reset_counters(s.id, :guardians) end end end end
Version data entries
10 entries across 10 versions & 2 rubygems