So I am trying to use the following route:
<%= link_to like_post_path(@post), :method => :put do %>
No route matches [GET] "/posts/1/like"
resources :posts do
put "like" => "posts#upvote"
put "dislike" => "posts#downvote"
You are using correct format and your code is should generate something like this:
<a data-method="put" href="...">
From your routes error message we can conclude that it is not being sent using
An easy fix would be to include
application.js file (jquery and rails js extension are included by default) in your page.