instance method check_reorder_deprecation

Ruby on Rails 6.1.7.10

Since v6.1.7.10 Last seen in v6.1.7.10 Private

Signature

check_reorder_deprecation()

No documentation comment.

Source
# 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

Defined in activerecord/lib/active_record/relation/finder_methods.rb line 367 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::FinderMethods

Type at least 2 characters to search.

↑↓ navigate · open · esc close