I have the following link_to methods:
<%= link_to "Vote up", :url => {:controller => :votes, :action => :vote_up, :id => i.id},
:update => "total_value_#{i.id}",
:remote => true %>
<%= link_to "Vote down", :url => {:controller => :votes, :action => :vote_down, :id => i.id},
:update => "total_value_#{i.id}",
:remote => true %>
I think there are some parts where I need {} or (). But I’m not sure where.
Any suggestions?
EDIT:
I get no syntax errors just this strange URL:
The link should trigger the action in the controller.
Please read carefully here about usage of link_to method:
http://apidock.com/rails/ActionView/Helpers/UrlHelper/link_to