mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove deprecated calls to SelectManager#wheres
with no replacement
This commit is contained in:
parent
a8f6662def
commit
9cbfc8a370
2 changed files with 0 additions and 23 deletions
|
@ -161,11 +161,6 @@ module Arel
|
|||
@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?
|
||||
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
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
|
Loading…
Reference in a new issue