From bacd8401b4c92b9dedf9539ddbba8fae5c2464e3 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Wed, 6 Nov 2013 10:18:45 +1100 Subject: [PATCH 1/2] Compile all admin css files for manual inclusion (fixes BugHerd #126) --- config/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index d6f17c8356..2a35ac9a85 100644 --- a/config/application.rb +++ b/config/application.rb @@ -77,7 +77,7 @@ module Openfoodnetwork config.assets.initialize_on_precompile = true config.assets.precompile += ['store/all.css', 'store/all.js', 'store/shop_front.js'] - config.assets.precompile += ['admin/all.css', 'admin/*.js', 'admin/**/*.js'] + config.assets.precompile += ['admin/all.css', 'admin/*.css*', 'admin/*.js', 'admin/**/*.js'] config.assets.precompile += ['comfortable_mexican_sofa/*'] config.assets.precompile += ['search/all.css', 'search/*.js'] config.assets.precompile += ['shared/*'] From fd432279217f83cc61dd2c25909b732fa960f28b Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Wed, 6 Nov 2013 10:42:39 +1100 Subject: [PATCH 2/2] Explicitly precompile style needed --- config/application.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index 2a35ac9a85..e1fce9d021 100644 --- a/config/application.rb +++ b/config/application.rb @@ -75,9 +75,17 @@ module Openfoodnetwork # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' + # css and js files other than application.* are not precompiled by default + # Instead, they must be explicitly included below + # http://stackoverflow.com/questions/8012434/what-is-the-purpose-of-config-assets-precompile + # + # It looks like Rails should compile scss files without explicitly listing them here + # (see railties/lib/rails/application/configuration.rb). However, that's not what's + # happening with admin/restore_spree_form_cms.css.scss. If this becomes an ongoing problem, + # investigate further. config.assets.initialize_on_precompile = true config.assets.precompile += ['store/all.css', 'store/all.js', 'store/shop_front.js'] - config.assets.precompile += ['admin/all.css', 'admin/*.css*', 'admin/*.js', 'admin/**/*.js'] + config.assets.precompile += ['admin/all.css', 'admin/restore_spree_from_cms.css.scss', 'admin/*.js', 'admin/**/*.js'] config.assets.precompile += ['comfortable_mexican_sofa/*'] config.assets.precompile += ['search/all.css', 'search/*.js'] config.assets.precompile += ['shared/*']