From a0af78f0ea9f9e5c0f02f968a630d68af7ccca12 Mon Sep 17 00:00:00 2001 From: itsalongstory Date: Thu, 1 Aug 2024 09:56:35 +0000 Subject: [PATCH] Fix `ransack_alias` issue, close #1239 --- lib/ransack/nodes/grouping.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ransack/nodes/grouping.rb b/lib/ransack/nodes/grouping.rb index 1bf70550..5dcbc28d 100644 --- a/lib/ransack/nodes/grouping.rb +++ b/lib/ransack/nodes/grouping.rb @@ -53,7 +53,7 @@ def [](key) end def []=(key, value) - conditions.reject! { |c| c.key == key.to_s } + conditions.reject! { |c| c.key == key.to_s && c.value == value.value } self.conditions << value end