impress/app/models/contribution_observer.rb

12 lines
245 B
Ruby
Raw Normal View History

2012-08-09 19:59:35 -07:00
class ContributionObserver < ActiveRecord::Observer
def after_create(contribution)
controller.expire_fragment('outfits#new latest_contribution')
end
private
def controller
@controller ||= ActionController::Base.new
end
end