KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Here is my array: finalcount = Vote.where(:month => month, :year => year, :vote_id => vote.id).count I'd like to use group_by (I think?) to group the votes by user_id (which each vote has), and then return the user_id with the highest votes. Any ideas how I can do this?
Tags (comma-separated)
Save Edits
Cancel