mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove deprecated calls to insert
with preference to using compile_insert
and then calling to_sql
on the resulting object to execute the SQL
This commit is contained in:
parent
6aa055f5ab
commit
4cbc19075b
1 changed files with 0 additions and 11 deletions
|
@ -41,17 +41,6 @@ switch to `compile_update`
|
||||||
InsertManager.new @engine
|
InsertManager.new @engine
|
||||||
end
|
end
|
||||||
|
|
||||||
# FIXME: this method should go away
|
|
||||||
def insert values
|
|
||||||
if $VERBOSE
|
|
||||||
warn <<-eowarn
|
|
||||||
insert (#{caller.first}) is deprecated and will be removed in Arel 4.0.0. Please
|
|
||||||
switch to `compile_insert`
|
|
||||||
eowarn
|
|
||||||
end
|
|
||||||
@engine.connection.insert compile_insert(values).to_sql
|
|
||||||
end
|
|
||||||
|
|
||||||
def compile_delete
|
def compile_delete
|
||||||
dm = DeleteManager.new @engine
|
dm = DeleteManager.new @engine
|
||||||
dm.wheres = @ctx.wheres
|
dm.wheres = @ctx.wheres
|
||||||
|
|
Loading…
Reference in a new issue