I am trying to implement a voting system like here in Stack Overflow. (Using Rails 3) I want the vote to be done without reloading the page, so I have this code
link_to("/tags/#{tag.id}/upVote", :remote => true )
And so, in my / views / tags directory, I have a file called _upVote.js.erb, which I thought would be called when this link is clicked, but it doesnβt. It tries to treat upVote as HTML, and this is the error I get
Missing / upVote template tag with {: formats => [: html]
Also, here is what I have in the routes file
match "tags/:id/upVote" => "tags#upVote"
Any ideas how I can make this work?
source
share