From: Tom Hughes Date: Thu, 9 Jun 2011 14:22:15 +0000 (+0100) Subject: Expire diary pages which contain comments by a user when necessary X-Git-Tag: live~6848^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/85e99d3127e5febcf4698c9d2576f653775af787?ds=inline;hp=-c Expire diary pages which contain comments by a user when necessary --- 85e99d3127e5febcf4698c9d2576f653775af787 diff --git a/app/models/user_sweeper.rb b/app/models/user_sweeper.rb index d2fd983f7..5286b97b1 100644 --- a/app/models/user_sweeper.rb +++ b/app/models/user_sweeper.rb @@ -22,6 +22,10 @@ private expire_action(:controller => 'diary_entry', :action => 'rss', :language => entry.language_code, :display_name => nil) end + old_record.diary_comments.each do |comment| + expire_action(:controller => 'diary_entry', :action => 'view', :display_name => comment.diary_entry.user.display_name, :id => comment.diary_entry.id) + end + expire_action(:controller => 'diary_entry', :action => 'list', :language => nil, :display_name => nil) expire_action(:controller => 'diary_entry', :action => 'list', :language => nil, :display_name => old_record.display_name)