diff options
author | Bryan Helmkamp <bryan@brynary.com> | 2009-10-01 00:14:15 -0400 |
---|---|---|
committer | Bryan Helmkamp <bryan@brynary.com> | 2009-10-01 00:14:15 -0400 |
commit | 6d093fb719f4f080d47c8aeadb72201979c604d7 (patch) | |
tree | 33742aa745b643a511da0c392210d1289f851087 /lib/arel/engines | |
parent | 0da3bbe9a48d0fe2cd2c4cb2dd1590725ee6ad8c (diff) | |
download | rails-6d093fb719f4f080d47c8aeadb72201979c604d7.tar.gz rails-6d093fb719f4f080d47c8aeadb72201979c604d7.tar.bz2 rails-6d093fb719f4f080d47c8aeadb72201979c604d7.zip |
Removing unused params from #to_sql methods on writes
Diffstat (limited to 'lib/arel/engines')
-rw-r--r-- | lib/arel/engines/sql/relations/writes.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/arel/engines/sql/relations/writes.rb b/lib/arel/engines/sql/relations/writes.rb index d648a54d91..42496ef735 100644 --- a/lib/arel/engines/sql/relations/writes.rb +++ b/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 @@ module Arel 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,7 +26,7 @@ module Arel end class Update < Compound - def to_sql(formatter = nil) + def to_sql build_query \ "UPDATE #{table_sql} SET", assignment_sql, @@ -34,6 +34,7 @@ module Arel end protected + def assignment_sql if assignments.respond_to?(:collect) assignments.collect do |attribute, value| |