From 5cc98a5afd375f11aef2552f8ea69607ea46fe13 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