method
check_reorder_deprecation
v6.1.3.1 -
Show latest stable
- Class:
ActiveRecord::FinderMethods
check_reorder_deprecation()private
No documentation available.
# File activerecord/lib/active_record/relation/finder_methods.rb, line 367
def check_reorder_deprecation
if !order_values.empty? && order_values.all?(&:blank?)
blank_value = order_values.first
ActiveSupport::Deprecation.warn(<<~MSG.squish)
`.reorder(#{blank_value.inspect})` with `.first` / `.first!` no longer
takes non-deterministic result in Rails 6.2.
To continue taking non-deterministic result, use `.take` / `.take!` instead.
MSG
end
end