Commit a22183b4 authored by Martin Markech's avatar Martin Markech
Browse files

prepare for recent album page fragment

parent 925bfcb7
# This is not traditional sweeper, this is only class called in pages_extension.rb , because I was unable to
# append this sweeper in Admin::PagesController.
module Refinery
module Admin
class AlbumPageSweeper
def self.sweep
ActionController::Base.new.expire_fragment( 'refinery/recent_album_page')
end
end
end
end
......@@ -29,10 +29,14 @@ module Refinery
if album_page_params[:album_id].blank?
self.album_page.destroy
Refinery::Admin::AlbumPageSweeper.sweep
# create or update if changed
elsif self.album_page.album_id.to_s != album_page_params[:album_id]
self.album_page.update_attributes( album_page_params)
self.album_page.save
Refinery::Admin::AlbumPageSweeper.sweep
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment