soundcloud/soundcloud-competition — Issue #1: Displaying Number of Votes
Author: seanyseanyseany
Created: 2011-10-13 16:59:09+00:00
State: open

I have the app running but would like to display the number of votes that have been cast for each remix (like on the first generation of the app.)

So far have tried this (recommended from user on stack overflow) Just broke the app.

in app/controllers/tracks_controller.rb

@remixes = Remix.all(:order => 'votes_count DESC', :limit => 3)

in app/views/tracks/show.html.haml:

@remixes.each do |remix|
"#{remix.track_id} has #{remix.votes_count} votes"
end