Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion active_admin_filters_visibility.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion spec/support/rails_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Loading