JimPatterson

JimPatterson

1p

1 comments posted · 0 followers · following 0

17 years ago @ Ariejan.net - Ruby: Sort an array of... · 0 replies · +1 points

You can also use the symbol to Proc shorthand in Rails if you are just sorting on an attribute:
User.find(:all).sort_by(&:name)

But its definitely better to do the sorting in the database if you can.