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 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"