提交 9cbfc8a3 编写于 作者: V Vipul A M

Remove deprecated calls to `SelectManager#wheres` with no replacement

上级 a8f6662d
......@@ -161,11 +161,6 @@ def orders
@ast.orders
end
def wheres
warn "#{caller[0]}: SelectManager#wheres is deprecated and will be removed in Arel 4.0.0 with no replacement"
Compatibility::Wheres.new @engine.connection, @ctx.wheres
end
def where_sql
return if @ctx.wheres.empty?
......
require 'helper'
module Arel
describe 'activerecord compatibility' do
describe 'select manager' do
it 'provides wheres' do
table = Table.new :users
manager = Arel::SelectManager.new Table.engine
manager.where table[:id].eq 1
manager.where table[:name].eq 'Aaron'
manager.wheres.map { |x|
x.value
}.join(', ').must_equal "\"users\".\"id\" = 1, \"users\".\"name\" = 'Aaron'"
end
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册