diff --git a/Gemfile.lock b/Gemfile.lock index 2f2991ec804..329c55871d7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -123,7 +123,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - carrierwave (3.0.5) + carrierwave (3.0.7) activemodel (>= 6.0.0) activesupport (>= 6.0.0) addressable (~> 2.6) @@ -360,7 +360,7 @@ GEM rails-i18n rainbow (>= 2.2.2, < 4.0) terminal-table (>= 1.5.1) - image_processing (1.12.2) + image_processing (1.13.0) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) inline_svg (1.10.0) @@ -890,8 +890,9 @@ GEM rubocop (~> 1.61) ruby-progressbar (1.13.0) ruby-rc4 (0.1.5) - ruby-vips (2.2.0) + ruby-vips (2.2.2) ffi (~> 1.12) + logger ruby2_keywords (0.0.5) rubyntlm (0.6.5) base64 @@ -954,7 +955,7 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - ssrf_filter (1.1.2) + ssrf_filter (1.2.0) statsd-ruby (1.5.0) stringio (3.1.2) sync (0.5.0) diff --git a/app/models/call_for_evidence_response_form_data.rb b/app/models/call_for_evidence_response_form_data.rb index 703ddd440e9..4035c7ccd42 100644 --- a/app/models/call_for_evidence_response_form_data.rb +++ b/app/models/call_for_evidence_response_form_data.rb @@ -27,6 +27,6 @@ def filename end def assets_match_updated_image_filename - assets.reject { |asset| asset.filename.include?(carrierwave_file) }.empty? + assets.all? { |asset| asset.filename.include?(filename) } if filename end end diff --git a/app/models/consultation_response_form_data.rb b/app/models/consultation_response_form_data.rb index 2722f279998..81c25240b2e 100644 --- a/app/models/consultation_response_form_data.rb +++ b/app/models/consultation_response_form_data.rb @@ -6,10 +6,6 @@ class ConsultationResponseFormData < ApplicationRecord as: :assetable, inverse_of: :assetable - has_many :assets, - as: :assetable, - inverse_of: :assetable - validates :file, presence: true def auth_bypass_ids @@ -30,6 +26,6 @@ def filename end def assets_match_updated_image_filename - assets.reject { |asset| asset.filename.include?(carrierwave_file) }.empty? + assets.all? { |asset| asset.filename.include?(filename) } if filename end end diff --git a/app/models/featured_image_data.rb b/app/models/featured_image_data.rb index 0cadb2d0d65..9fa72e8d4ba 100644 --- a/app/models/featured_image_data.rb +++ b/app/models/featured_image_data.rb @@ -40,8 +40,6 @@ def republish_on_assets_ready private def assets_match_updated_image_filename - return false unless carrierwave_image - - assets.all? { |asset| asset.filename.include?(carrierwave_image) } + assets.all? { |asset| asset.filename.include?(filename) } if filename end end diff --git a/app/models/promotional_feature_item.rb b/app/models/promotional_feature_item.rb index 9193712ac86..66b844082df 100644 --- a/app/models/promotional_feature_item.rb +++ b/app/models/promotional_feature_item.rb @@ -65,6 +65,6 @@ def republish_organisation end def assets_match_updated_image_filename - assets.reject { |asset| asset.filename.include?(self[:image]) }.empty? + assets.all? { |asset| asset.filename.include?(self[:image]) } if self[:image] end end