app/sweepers/pictures_sweeper.rb in alchemy_cms-2.0.rc2 vs app/sweepers/pictures_sweeper.rb in alchemy_cms-2.0.rc3
- old
+ new
@@ -10,11 +10,12 @@
end
private
def expire_cache_for(picture)
+ # Removing all variants of the picture with FileUtils.
FileUtils.rm_rf("#{Rails.root}/public/pictures/show/#{picture.id}")
FileUtils.rm_rf("#{Rails.root}/public/pictures/thumbnails/#{picture.id}")
- expire_page(:controller => '/pictures', :action => 'zoom', :id => picture.id)
+ expire_page(zoom_picture_path(picture, :format => 'png'))
end
end