mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove Arel::Crud
from Arel::Table
Originally `compile_update` and `compile_delete` doesn't work at all on `Arel::Table` since `Arel::Table` doesn't have `@ast` and `@ctx`. `compile_insert` and `create_insert` works but do not use the receiver's information at all, so just use `Arel::InsertManager.new(arel_table)` instead.
This commit is contained in:
parent
6ee96a8f42
commit
cc5f6457cc
2 changed files with 0 additions and 8 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
module Arel # :nodoc: all
|
||||
class Table
|
||||
include Arel::Crud
|
||||
include Arel::FactoryMethods
|
||||
include Arel::AliasPredication
|
||||
|
||||
|
|
|
@ -42,13 +42,6 @@ module Arel
|
|||
assert_equal "bar", join.right
|
||||
end
|
||||
|
||||
it "should return an insert manager" do
|
||||
im = @relation.compile_insert "VALUES(NULL)"
|
||||
assert_kind_of Arel::InsertManager, im
|
||||
im.into Table.new(:users)
|
||||
assert_equal "INSERT INTO \"users\" VALUES(NULL)", im.to_sql
|
||||
end
|
||||
|
||||
describe "skip" do
|
||||
it "should add an offset" do
|
||||
sm = @relation.skip 2
|
||||
|
|
Loading…
Reference in a new issue