From 7a93ce0b1e8560ef5bad7cb7f7a170507bfde16d Mon Sep 17 00:00:00 2001 From: Nick Kallen Date: Sun, 13 Apr 2008 19:23:23 -0700 Subject: fixed problem with updating multiple values --- lib/active_relation/relations/update.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/active_relation/relations/update.rb b/lib/active_relation/relations/update.rb index 46aafd38a5..5a7be31290 100644 --- a/lib/active_relation/relations/update.rb +++ b/lib/active_relation/relations/update.rb @@ -11,7 +11,7 @@ module ActiveRelation "UPDATE #{table_sql} SET", assignments.collect do |attribute, value| "#{value.format(attribute)} = #{attribute.format(value)}" - end.join("\n"), + end.join(",\n"), ("WHERE #{selects.collect(&:to_sql).join('\n\tAND ')}" unless selects.blank?) ].join("\n") end -- cgit v1.2.3