Permalink
Browse files

Removing unused params from #to_sql methods on writes

  • Loading branch information...
1 parent 0da3bbe commit 6d093fb719f4f080d47c8aeadb72201979c604d7 @brynary brynary committed Oct 1, 2009
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/arel/engines/sql/relations/writes.rb
@@ -1,6 +1,6 @@
module Arel
class Deletion < Compound
- def to_sql(formatter = nil)
+ def to_sql
build_query \
"DELETE",
"FROM #{table_sql}",
@@ -10,7 +10,7 @@ def to_sql(formatter = nil)
end
class Insert < Compound
- def to_sql(formatter = nil)
+ def to_sql
insertion_attributes_values_sql = if record.is_a?(Value)
record.value
else
@@ -26,14 +26,15 @@ def to_sql(formatter = nil)
end
class Update < Compound
- def to_sql(formatter = nil)
+ def to_sql
build_query \
"UPDATE #{table_sql} SET",
assignment_sql,
build_update_conditions_sql
end
protected
+
def assignment_sql
if assignments.respond_to?(:collect)
assignments.collect do |attribute, value|

0 comments on commit 6d093fb

Please sign in to comment.