What is a
here? I guess it's vote direction
You have to remove argument a
from vote
action and pass direction via params
for link path.
Fox example:
vote_comment_path(@comment.id, dir: 1) # or dir: -1
More than that there is no route for vote
action. You can describe it like so:
resources :comments do
put :vote, as: :member
end
upd I would recommend you to read following guide http://guides.rubyonrails.org/routing.html
action
in your path is not valid. You link should looks like
= link_to 'Yes', vote_comment_path(comment, dir: 1), method: :put
vote_comment_path
can be different you could check it by rake routes
command:
$ rake routes