fix Group.ensure_consistency!

This commit is contained in:
Régis Hanol 2016-04-04 23:41:49 +02:00
parent 7899c2d86e
commit b00ea5dc92

View file

@ -218,11 +218,11 @@ class Group < ActiveRecord::Base
end
def self.ensure_consistency!
reset_all_counters
refresh_automatic_groups
reset_all_counters!
refresh_automatic_groups!
end
def self.reset_all_counters
def self.reset_all_counters!
Group.pluck(:id).each do |group_id|
Group.reset_counters(group_id, :group_users)
end