class method
self.implicit_order_column=
Ruby on Rails edge
Since v6.0.6.1Signature
implicit_order_column=(column_name)
Sets the column(s) to sort records by when no explicit order clause is used during an ordered finder call. Useful for models where the primary key isn’t an auto-incrementing integer (such as UUID).
By default, records are subsorted by primary key to ensure deterministic results. To disable this subsort behavior, set implicit_order_column to ‘[“column_name”, nil]`.
Source
# File activerecord/lib/active_record/model_schema.rb, line 121
Defined in activerecord/lib/active_record/model_schema.rb line 121
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ModelSchema