method

ordered_relation

Importance_0
v7.0.0 - Show latest stable - 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 574
      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.