2010-12-11 06:37:39 -08:00
|
|
|
class UserSweeper < ActionController::Caching::Sweeper
|
|
|
|
observe User
|
2013-12-27 11:49:46 -08:00
|
|
|
def after_update(user)
|
|
|
|
# Delegate null-list sweeping to the ClosetListObserver.
|
|
|
|
null_lists = [true, false].map { |owned| user.null_closet_list(owned) }
|
|
|
|
null_lists.each { |list| ClosetListObserver.instance.after_update(list) }
|
2010-12-11 06:37:39 -08:00
|
|
|
end
|
|
|
|
end
|