Sha256: eb67f9b7a2035e98aa3fd46d4005b1405482541102501566c7b8dca8de8fe849
Contents?: true
Size: 365 Bytes
Versions: 21
Compression:
Stored size: 365 Bytes
Contents
class AreaUser < ActiveRecord::Base self.table_name = 'areas_users' belongs_to :area belongs_to :user after_create :increment_area_users_count after_destroy :decrement_area_users_count private def increment_area_users_count area.users_count.increment! end def decrement_area_users_count area.users_count.decrement! end end
Version data entries
21 entries across 21 versions & 1 rubygems