From 3a2f3496f0d066991f859308acde37117744e6ca Mon Sep 17 00:00:00 2001 From: Denis Talakevich Date: Thu, 12 Nov 2026 10:19:47 +0200 Subject: [PATCH 1/2] Allowlist Author associations in the dummy app for Ransack 6 Ransack 6 raises when a model does not define ransackable_associations, so every spec failed once bundler resolved ransack 6.1.0. Co-Authored-By: Clanker --- spec/support/rails_template.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/support/rails_template.rb b/spec/support/rails_template.rb index 9a755f8..d760ecd 100644 --- a/spec/support/rails_template.rb +++ b/spec/support/rails_template.rb @@ -21,10 +21,14 @@ inject_into_file "app/models/author.rb", " validates_presence_of :name\n validates_uniqueness_of :last_name\n", after: "ApplicationRecord\n" inject_into_file "app/models/post.rb", " validates_presence_of :author\n", after: ":author\n" -# Add ransackable_attributes for Ransack 4+ +# Add ransackable_attributes/associations for Ransack 4+ (Ransack 6 raises +# when a model leaves ransackable_associations undefined) inject_into_file "app/models/author.rb", " def self.ransackable_attributes(auth_object = nil)\n" \ " [\"name\", \"last_name\", \"birthday\", \"created_at\"]\n" \ + " end\n" \ + " def self.ransackable_associations(auth_object = nil)\n" \ + " []\n" \ " end\n", after: "ApplicationRecord\n" From 76499681f6283b5d50c22b5f0e62c14e494eb9a1 Mon Sep 17 00:00:00 2001 From: Denis Talakevich Date: Thu, 12 Nov 2026 10:19:47 +0200 Subject: [PATCH 2/2] Exclude ActiveAdmin 4 prereleases from the dependency RubyGems sorts 4.0.0.beta23 below 4.0, so "< 4.0" let bundler pick an ActiveAdmin 4 beta, which this jQuery plugin does not support. Co-Authored-By: Clanker --- active_admin_filters_visibility.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/active_admin_filters_visibility.gemspec b/active_admin_filters_visibility.gemspec index 86ccded..44a5748 100644 --- a/active_admin_filters_visibility.gemspec +++ b/active_admin_filters_visibility.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 3.3' - s.add_dependency 'activeadmin', '>= 3.2', '< 4.0' + s.add_dependency 'activeadmin', '>= 3.2', '< 4.0.0.a' # Whitelist, not a reject list: a new directory in the repo does not # reach consumers until it is named here. The reject form needs a new