# rubocop:disable Naming/MethodName # rubocop:disable Naming/UncommunicativeMethodParamName module Arel module Visitors class ToSql def visit_Arel_Nodes_Equality(o, collector) right = o.right collector = visit o.left, collector case right when Arel::Nodes::Unknown, Arel::Nodes::False, Arel::Nodes::True collector << ' IS ' visit right, collector when NilClass collector << ' IS NULL' else collector << ' = ' visit right, collector end end end end end # rubocop:enable Naming/MethodName # rubocop:enable Naming/UncommunicativeMethodParamName