This project is archived and is in readonly mode.

#6776 new
David Phillips

Return objects from ActiveRecord::Relation.find in argument order

Reported by David Phillips | May 11th, 2011 @ 07:14 PM

When performing an un-ordered find query, I often want the objects in argument order:

Person.find(1, 2, 3) -> [#<Person id: 1>, #<Person id: 2>, #<Person id: 3>]
Person.find(3, 2, 1) -> [#<Person id: 3>, #<Person id: 2>, #<Person id: 1>]

Is there any downside to this, apart from the minor performance impact?

No comments found

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages