From d1192956e481474a77ea01da35c0546ff422a0e6 Mon Sep 17 00:00:00 2001
From: Aaron Patterson <aaron.patterson@gmail.com>
Date: Fri, 11 Apr 2014 16:14:04 -0700
Subject: always add a space before keywords (it is easier)

---
 lib/arel/visitors/mysql.rb | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/lib/arel/visitors/mysql.rb b/lib/arel/visitors/mysql.rb
index c4800f0466..70a37582c2 100644
--- a/lib/arel/visitors/mysql.rb
+++ b/lib/arel/visitors/mysql.rb
@@ -54,24 +54,18 @@ module Arel
         collector << "UPDATE "
         collector = visit o.relation, collector
 
-        add_space = false
-
         unless o.values.empty?
-          add_space = true
-          collector << "SET "
+          collector << " SET "
           collector = inject_join o.values, collector, ', '
         end
 
         unless o.wheres.empty?
-          collector << ' ' if add_space
-          add_space = true
-          collector << "WHERE "
+          collector << " WHERE "
           collector = inject_join o.wheres, collector, ' AND '
         end
 
         unless o.orders.empty?
-          collector << ' ' if add_space
-          collector << "ORDER BY "
+          collector << " ORDER BY "
           collector = inject_join o.orders, collector, ', '
         end
 
-- 
cgit v1.2.3