mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
FIX: expire stylesheet cache on save
This commit is contained in:
parent
97a44b4c43
commit
4a7e0416d1
@ -1,3 +1,5 @@
|
||||
require_dependency 'sass/discourse_stylesheets'
|
||||
|
||||
class ColorScheme < ActiveRecord::Base
|
||||
|
||||
attr_accessor :is_base
|
||||
@ -96,6 +98,7 @@ class ColorScheme < ActiveRecord::Base
|
||||
|
||||
def publish_discourse_stylesheet
|
||||
MessageBus.publish("/discourse_stylesheet", self.name)
|
||||
DiscourseStylesheets.cache.clear
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -1,4 +1,5 @@
|
||||
require_dependency 'sass/discourse_sass_compiler'
|
||||
require_dependency 'sass/discourse_stylesheets'
|
||||
|
||||
class SiteCustomization < ActiveRecord::Base
|
||||
ENABLED_KEY = '7e202ef2-56d7-47d5-98d8-a9c8d15e57dd'
|
||||
@ -43,6 +44,7 @@ class SiteCustomization < ActiveRecord::Base
|
||||
end
|
||||
MessageBus.publish "/header-change/#{key}", header if header_changed?
|
||||
MessageBus.publish "/footer-change/#{key}", footer if footer_changed?
|
||||
DiscourseStylesheets.cache.clear
|
||||
end
|
||||
|
||||
after_destroy do
|
||||
|
Loading…
Reference in New Issue
Block a user