So I am trying to use the following route:
<%= link_to like_post_path(@post), :method => :put do %>
But I don't know why is using GET
method instead of PUT
No route matches [GET] "/posts/1/like"
makes no sense to me..
myroutes.rb:
resources :posts do
member do
put "like" => "posts#upvote"
put "dislike" => "posts#downvote"
end