Make test query work with Rails 3 and 4.0

because ActiveRecord#second was added in Rails 4.1.
This commit is contained in:
Jon Atack 2016-07-23 15:15:01 +02:00
parent 98df2c5b52
commit 943fe31c2f
1 changed files with 1 additions and 1 deletions

View File

@ -323,7 +323,7 @@ module Ransack
end
it 'should function correctly when passing an array of strings' do
a, b = Person.first.id.to_s, Person.second.id.to_s
a, b = Person.select(:id).order(:id).limit(2).map { |a| a.id.to_s }
Person.create!(name: a)
s = Person.ransack(array_people_names_in: true)