method
check_reorder_deprecation
rails 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 7.0.
To continue taking non-deterministic result, use `.take` / `.take!` instead.
MSG
end
end