From 89c0ab2635798e187b8975f04e78de60c43f074d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 29 Mar 2024 04:07:03 +0100 Subject: [PATCH] Bump sprockets-rails from 3.2.2 to 3.4.2 Note that, since version 3.3.0, sprockets-rails uses a processor to get digested paths for asset files [1]. This breaks the images used in CKEditor buttons [2], so we're using the new configuration option [3] to keep the old behavior. [1] Pull request 476 in https://github.com/rails/sprockets-rails [2] Issue 919 in https://github.com/galetahub/ckeditor [3] Pull request 489 in https://github.com/rails/sprockets-rails --- Gemfile.lock | 6 +++--- config/application.rb | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index fe659bc4577..2a813ecf551 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -609,9 +609,9 @@ GEM sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) sshkit (1.22.0) mutex_m diff --git a/config/application.rb b/config/application.rb index 9c493bc4b6b..b950ab321a3 100644 --- a/config/application.rb +++ b/config/application.rb @@ -39,6 +39,9 @@ class Application < Rails::Application # work with the _count database columns we use for caching purposes config.active_record.has_many_inversing = false + # Disable Sprockets AssetUrlProcessor for CKEditor compatibility + config.assets.resolve_assets_in_css_urls = false + # Keep reading existing data in the legislation_annotations ranges column config.active_record.yaml_column_permitted_classes = [ActiveSupport::HashWithIndifferentAccess, Symbol]