class Ransack::Nodes::Grouping

def remove_duplicate_conditions!

def remove_duplicate_conditions!
  # If self.conditions.uniq! is called without passing a block, then
  # conditions differing only by ransacker_args within attributes are
  # wrongly considered equal and are removed.
  self.conditions.uniq! do |c|
    c.attributes.map { |a| [a.name, a.ransacker_args] }.flatten +
    [c.predicate.name] +
    c.values.map { |v| v.value }
  end
end