mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
DEV: Live refresh all themes when watching stylesheets (#10337)
This commit is contained in:
parent
3d9eb3e085
commit
e6dbb4fcf5
2 changed files with 14 additions and 21 deletions
|
@ -48,16 +48,6 @@ class ApplicationController < ActionController::Base
|
|||
|
||||
layout :set_layout
|
||||
|
||||
if Rails.env == "development"
|
||||
after_action :remember_theme_id
|
||||
|
||||
def remember_theme_id
|
||||
if @theme_ids.present? && request.format == "html"
|
||||
Stylesheet::Watcher.theme_id = @theme_ids.first if defined? Stylesheet::Watcher
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def has_escaped_fragment?
|
||||
SiteSetting.enable_escaped_fragments? && params.key?("_escaped_fragment_")
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue