DEV: fix live refresh if you have a custom theme selected in dev

This commit is contained in:
Sam
2018-05-16 17:25:49 +10:00
parent f9d2c69bbe
commit ff90881238
2 changed files with 19 additions and 1 deletions

View File

@ -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