method

ordered_relation

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ActiveRecord::FinderMethods
ordered_relation() private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/relation/finder_methods.rb, line 578
      def ordered_relation
        if order_values.empty? && (implicit_order_column || primary_key)
          if implicit_order_column && primary_key && implicit_order_column != primary_key
            order(table[implicit_order_column].asc, table[primary_key].asc)
          else
            order(table[implicit_order_column || primary_key].asc)
          end
        else
          self
        end
      end
Register or log in to add new notes.