diff --git a/Gemfile.lock b/Gemfile.lock index 7f452b1bfe..8f4d382433 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -74,7 +74,7 @@ GEM concurrent-ruby (1.1.5) crack (0.4.3) safe_yaml (~> 1.0.0) - crass (1.0.4) + crass (1.0.5) database_cleaner (1.7.0) datetime_picker_rails (0.0.7) momentjs-rails (>= 2.8.1) @@ -134,7 +134,7 @@ GEM kgio (2.11.2) launchy (2.4.3) addressable (~> 2.3) - loofah (2.3.0) + loofah (2.3.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) method_source (0.9.2) diff --git a/README.md b/README.md index 59bbabaed6..f4908d327e 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,21 @@ to see your new dashboard in action. For more detailed instructions or to make it work with Rails API-only applications, please go through the ['Getting Started` guide](https://administrate-prototype.herokuapp.com/getting_started). +If your apps uses Sprockets 4, you'll need to add Administrate's assets to your `manifest.js` file. To do this, add these two lines to the file: + +``` +//= link administrate/application.css +//= link administrate/application.js +``` + +Otherwise, your app will show you this error: + +``` +Asset `administrate/application.css` was not declared to be precompiled in production. +Declare links to your assets in `app/assets/config/manifest.js`. +``` + +For more information on why this is necessary, see https://www.schneems.com/2017/11/22/self-hosted-config-introducing-the-sprockets-manifestjs ## Create Additional Dashboards diff --git a/spec/example_app/app/assets/config/manifest.js b/spec/example_app/app/assets/config/manifest.js new file mode 100644 index 0000000000..a859a4a9d4 --- /dev/null +++ b/spec/example_app/app/assets/config/manifest.js @@ -0,0 +1,2 @@ +//= link administrate/application.css +//= link administrate/application.js