class Ransack::Nodes::Condition
def replace_right_node?(predicate)
def replace_right_node?(predicate) return false unless predicate.is_a?(Arel::Nodes::Binary) arel_node = predicate.right return false unless arel_node.is_a?(Arel::Nodes::Casted) relation, name = arel_node.attribute.values attribute_type = relation.type_for_attribute(name).type attribute_type == :integer && arel_node.value.is_a?(Integer) end