aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/relations/writes
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/relations/writes')
-rw-r--r--lib/arel/relations/writes/delete.rb4
-rw-r--r--lib/arel/relations/writes/insert.rb4
-rw-r--r--lib/arel/relations/writes/update.rb4
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/arel/relations/writes/delete.rb b/lib/arel/relations/writes/delete.rb
index b1ff3bef27..0a04454e7f 100644
--- a/lib/arel/relations/writes/delete.rb
+++ b/lib/arel/relations/writes/delete.rb
@@ -12,8 +12,8 @@ module Arel
].compact.join("\n")
end
- def call(connection = engine)
- connection.delete(to_sql)
+ def call
+ engine.delete(self)
end
end
end
diff --git a/lib/arel/relations/writes/insert.rb b/lib/arel/relations/writes/insert.rb
index d579ad06d0..d05bd9cdc8 100644
--- a/lib/arel/relations/writes/insert.rb
+++ b/lib/arel/relations/writes/insert.rb
@@ -16,8 +16,8 @@ module Arel
].join("\n")
end
- def call(connection = engine)
- connection.insert(to_sql)
+ def call
+ engine.create(self)
end
end
end
diff --git a/lib/arel/relations/writes/update.rb b/lib/arel/relations/writes/update.rb
index 2e90de3a52..fd0aadb479 100644
--- a/lib/arel/relations/writes/update.rb
+++ b/lib/arel/relations/writes/update.rb
@@ -18,8 +18,8 @@ module Arel
].join("\n")
end
- def call(connection = engine)
- connection.update(to_sql)
+ def call
+ engine.update(self)
end
end
end