From ec219599f33d9e91f7daecdac780c8021ddaabeb Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Mon, 26 Oct 2020 10:24:49 +0100 Subject: [PATCH] Fix host app not finding asset This fixes the error: ``` ActionView::Template::Error (The asset "decidim/direct_verifications/authorizations.css" is not present in the asset pipeline.) <%= stylesheet_link_tag "decidim/direct_verifications/authorizations" %> ``` --- app/assets/config/direct_verifications_admin_manifest.css | 3 +++ .../decidim/direct_verifications/authorizations.scss | 8 +------- .../direct_verifications/verification/admin_engine.rb | 5 ++++- 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 app/assets/config/direct_verifications_admin_manifest.css diff --git a/app/assets/config/direct_verifications_admin_manifest.css b/app/assets/config/direct_verifications_admin_manifest.css new file mode 100644 index 0000000..4bfd6eb --- /dev/null +++ b/app/assets/config/direct_verifications_admin_manifest.css @@ -0,0 +1,3 @@ +/* + *= link decidim/direct_verifications/authorizations.css + */ diff --git a/app/assets/stylesheets/decidim/direct_verifications/authorizations.scss b/app/assets/stylesheets/decidim/direct_verifications/authorizations.scss index dcbad04..fa4afb8 100644 --- a/app/assets/stylesheets/decidim/direct_verifications/authorizations.scss +++ b/app/assets/stylesheets/decidim/direct_verifications/authorizations.scss @@ -1,10 +1,4 @@ -// Copied from "decidim/admin/utils/settings". We better import the file - -$black: #1a181d; -$font-family-monospace: Consolas, 'Liberation Mono', Courier, monospace; -$global-weight-normal: normal; -$light-gray: #eee; -$medium-gray: #adadad; +@import "decidim/admin/utils/settings"; $code-color: $black; $code-font-family: $font-family-monospace; diff --git a/lib/decidim/direct_verifications/verification/admin_engine.rb b/lib/decidim/direct_verifications/verification/admin_engine.rb index 838476e..d51c9a5 100644 --- a/lib/decidim/direct_verifications/verification/admin_engine.rb +++ b/lib/decidim/direct_verifications/verification/admin_engine.rb @@ -16,7 +16,10 @@ class AdminEngine < ::Rails::Engine end initializer "decidim_direct_verifications.admin_assets" do |app| - app.config.assets.precompile += %w(direct_verifications_admin_manifest.js) + app.config.assets.precompile += %w( + direct_verifications_admin_manifest.js + direct_verifications_admin_manifest.css + ) end end end