Skip to content

Commit

Permalink
Flush cache after modifying friend sites
Browse files Browse the repository at this point in the history
  • Loading branch information
nono committed May 22, 2011
1 parent d34e29a commit cb00c8d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/admin/friend_sites_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# encoding: UTF-8
class Admin::FriendSitesController < AdminController
before_filter :find_friend_site, :except => [:index, :new, :create]
after_filter :expire_cache, :except => [:index, :new, :edit]

def index
@friend_sites = FriendSite.all
Expand Down Expand Up @@ -56,4 +57,7 @@ def find_friend_site
@friend_site = FriendSite.find(params[:id])
end

def expire_cache
expire_fragment "fragments/layouts/friends_and_links"
end
end

0 comments on commit cb00c8d

Please sign in to comment.