FEATURE: backend support for user-selectable components

* FEATURE: backend support for user-selectable components

* fix problems with previewing default theme

* rename preview_key => preview_theme_id

* omit default theme from child themes dropdown and try a different fix

* cache & freeze stylesheets arrays
This commit is contained in:
Osama Sayegh
2018-08-08 07:46:34 +03:00
committed by Sam
parent aafff740d2
commit 0b7ed8ffaf
53 changed files with 737 additions and 355 deletions

View File

@ -32,7 +32,7 @@ describe Middleware::AnonymousCache::Helper do
context "per theme cache" do
it "handles theme keys" do
theme = Theme.create(name: "test", user_id: -1, user_selectable: true)
theme = Fabricate(:theme, user_selectable: true)
with_bad_theme_key = new_helper("HTTP_COOKIE" => "theme_ids=abc").cache_key
with_no_theme_key = new_helper().cache_key