Skip to content

Instantly share code, notes, and snippets.

@mmmpa
Created February 23, 2017 23:13
Show Gist options
  • Save mmmpa/f39cc7b3f9ec63055ec15efa6e91ffe6 to your computer and use it in GitHub Desktop.
Save mmmpa/f39cc7b3f9ec63055ec15efa6e91ffe6 to your computer and use it in GitHub Desktop.
module Arel
module Nodes
const_set 'Separator', Class.new(Binary)
end
module Visitors
class ToSql < ::Arel::Visitors::Reduce
def visit_Arel_Nodes_Separator o, collector
collector = visit o.left, collector
collector << " SEPARATOR "
visit o.right, collector
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment