mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 20:24:47 +08:00
DEV: fix live refresh if you have a custom theme selected in dev
This commit is contained in:
@ -58,6 +58,16 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
layout :set_layout
|
||||
|
||||
if Rails.env == "development"
|
||||
after_action :remember_theme_key
|
||||
|
||||
def remember_theme_key
|
||||
if @theme_key
|
||||
Stylesheet::Watcher.theme_key = @theme_key if defined? Stylesheet::Watcher
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def has_escaped_fragment?
|
||||
SiteSetting.enable_escaped_fragments? && params.key?("_escaped_fragment_")
|
||||
end
|
||||
|
Reference in New Issue
Block a user