diff --git a/app/views/fields/json/_form.html.erb b/app/views/fields/json/_form.html.erb index 6b49420..e99d0a9 100644 --- a/app/views/fields/json/_form.html.erb +++ b/app/views/fields/json/_form.html.erb @@ -14,8 +14,8 @@ This partial renders an JSON database into structured form %> <% content_for :javascript, flush: true do %> -<%= javascript_include_tag '/assets/administrate-field-json.js' %> -<%= stylesheet_link_tag '/assets/administrate-field-json.css' %> +<%= javascript_include_tag 'administrate-field-json.js' %> +<%= stylesheet_link_tag 'administrate-field-json.css' %> <% end %> diff --git a/lib/administrate/field/json.rb b/lib/administrate/field/json.rb index b45da1d..fbc2098 100644 --- a/lib/administrate/field/json.rb +++ b/lib/administrate/field/json.rb @@ -16,8 +16,8 @@ class Engine < ::Rails::Engine Rails.application.config.assets.paths << engine_root.join("app", "assets", "javascripts", "administrate-field-json") Rails.application.config.assets.paths << engine_root.join("app", "assets", "stylesheets", "administrate-field-json") Rails.application.config.assets.paths << engine_root.join("vendor", "assets", "images") + Rails.application.config.assets.precompile += ['administrate-field-json.js','administrate-field-json.css'] end - end end end