1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-02 13:24:20 +01:00
fab-manager/app/sweepers/stylesheet_sweeper.rb

11 lines
308 B
Ruby
Raw Normal View History

2020-01-27 17:10:29 +01:00
# frozen_string_literal: true
# Build a cached version of the CSS stylesheet
2016-03-23 18:39:41 +01:00
class StylesheetSweeper < ActionController::Caching::Sweeper
observe Stylesheet
def after_update(record)
expire_page(controller: 'stylesheets', action: 'show', id: record.id) if record.saved_change_to_contents?
2016-03-23 18:39:41 +01:00
end
2020-01-27 17:10:29 +01:00
end