DEV: extract inline js when baking theme fields (#6447)

* extract inline js when baking theme fields
* destroy javascript cache when destroying theme fields

This work is needed to support CSP work
This commit is contained in:
Kyle Zhao
2018-10-15 12:55:23 +08:00
committed by Sam
parent aa60936115
commit 6acdea37c4
10 changed files with 306 additions and 40 deletions

View File

@@ -0,0 +1,10 @@
class CreateJavascriptCaches < ActiveRecord::Migration[5.2]
def change
create_table :javascript_caches do |t|
t.references :theme_field, null: false
t.string :digest, null: true, index: true
t.text :content, null: false
t.timestamps
end
end
end