Ruby on Rails has_many minimun
- by user273119
Look:
class User < ActiveRecord::Base
has_many :scores, :order => 'score DESC',:autosave =>true,
end
class Score < ActiveRecord::Base
belongs_to :user
end
Now, I want to order the users by the maximun score of each one,
The thing is that i need to get a user, two up and two down users
like a top 5 scores
how can I do that????
please is urgent!!