mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
11 lines
300 B
Ruby
11 lines
300 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.contents_changed?
|
|
end
|
|
end
|