Votes

#9 
You should create a scope for this using SQL. 

http://guides.rubyonrails.org/active_record_querying.html#scopes