Follow Along as I Stumble on the Path to Learning RoR

Finding Highest Value in Field

I had to find the highest value in a field.  The method I was looking for is maximum, as in:

User.maximum(“score”)

I found out how, via this post:

http://stackoverflow.com/questions/5798694/rails-3-how-can-i-find-the-users-with-the-highest-score

Advertisements

Comments are closed.