mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-05 16:24:21 +01:00
11 lines
308 B
Ruby
11 lines
308 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Build a cached version of the CSS stylesheet
|
|
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?
|
|
end
|
|
end
|