module Arel::Nodes

def self.build_quoted(other, attribute = nil)

def self.build_quoted(other, attribute = nil)
  case other
  when Arel::Nodes::Node, Arel::Attributes::Attribute, Arel::Table, Arel::SelectManager, Arel::Nodes::SqlLiteral, ActiveModel::Attribute
    other
  else
    case attribute
    when Arel::Attributes::Attribute
      Casted.new other, attribute
    else
      Quoted.new other
    end
  end
end