From c55d9c466d0123e56eaf1d6cf68210a6779b5f29 Mon Sep 17 00:00:00 2001 From: Mattia Roccoberton Date: Sun, 7 Jul 2024 12:37:23 +0200 Subject: [PATCH] chore: bump to version 0.6.0 --- README.md | 18 ++++++++++++++++++ gemfiles/rails60_administrate.gemfile.lock | 2 +- gemfiles/rails61_administrate.gemfile.lock | 2 +- gemfiles/rails70_administrate.gemfile.lock | 2 +- gemfiles/rails71_administrate.gemfile.lock | 2 +- lib/administrate_ransack/version.rb | 2 +- 6 files changed, 23 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 583afda..986f197 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,24 @@ prepend AdministrateRansack::Searchable <%= render('administrate_ransack/filters') %> ``` +- Update your model (ex. Post) exposing the ransackable attributes and associations, skipping this step will raise an exception that explains in details: + +```rb +class Post < ApplicationRecord + # ... + + class << self + def ransackable_attributes(_auth_object = nil) + %w[title description] + end + + def ransackable_associations(_auth_object = nil) + %w[author] + end + end +end +``` + - See the Usage section for extra options ## Usage diff --git a/gemfiles/rails60_administrate.gemfile.lock b/gemfiles/rails60_administrate.gemfile.lock index 7410751..e7c964f 100644 --- a/gemfiles/rails60_administrate.gemfile.lock +++ b/gemfiles/rails60_administrate.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - administrate_ransack (0.5.1) + administrate_ransack (0.6.0) administrate (~> 0.18) ransack (>= 2.3, < 5) diff --git a/gemfiles/rails61_administrate.gemfile.lock b/gemfiles/rails61_administrate.gemfile.lock index 40762da..d1729dd 100644 --- a/gemfiles/rails61_administrate.gemfile.lock +++ b/gemfiles/rails61_administrate.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - administrate_ransack (0.5.1) + administrate_ransack (0.6.0) administrate (~> 0.18) ransack (>= 2.3, < 5) diff --git a/gemfiles/rails70_administrate.gemfile.lock b/gemfiles/rails70_administrate.gemfile.lock index faa87d5..3a2390f 100644 --- a/gemfiles/rails70_administrate.gemfile.lock +++ b/gemfiles/rails70_administrate.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - administrate_ransack (0.5.1) + administrate_ransack (0.6.0) administrate (~> 0.18) ransack (>= 2.3, < 5) diff --git a/gemfiles/rails71_administrate.gemfile.lock b/gemfiles/rails71_administrate.gemfile.lock index 995a81d..749afad 100644 --- a/gemfiles/rails71_administrate.gemfile.lock +++ b/gemfiles/rails71_administrate.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - administrate_ransack (0.5.1) + administrate_ransack (0.6.0) administrate (~> 0.18) ransack (>= 2.3, < 5) diff --git a/lib/administrate_ransack/version.rb b/lib/administrate_ransack/version.rb index 2600a34..31c0d76 100644 --- a/lib/administrate_ransack/version.rb +++ b/lib/administrate_ransack/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module AdministrateRansack - VERSION = '0.5.1' + VERSION = '0.6.0' end