From 836a1534f887c8fa47aac10d6cc7ab8308c32f9b Mon Sep 17 00:00:00 2001 From: tatematsu-k Date: Thu, 21 Nov 2024 12:50:13 +0900 Subject: [PATCH] Fix issue with ransackable_attribute not handling symbols correctly --- lib/ransack/nodes/attribute.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ransack/nodes/attribute.rb b/lib/ransack/nodes/attribute.rb index 73b57f2a..0607d86a 100644 --- a/lib/ransack/nodes/attribute.rb +++ b/lib/ransack/nodes/attribute.rb @@ -20,8 +20,7 @@ def name=(name) def valid? bound? && attr && - context.klassify(parent).ransackable_attributes(context.auth_object) - .include?(attr_name.split('.').last) + context.ransackable_attribute?(attr_name.split('.').last, context.klassify(parent)) end def associated_collection?