routes.rb
resources :posts do
resources :votes
end
vote.htmtl.erb
<%= link_to "vote up",post_votes_path(post),direction:"up", method: :post %>
生成的html
<a href="/posts/2/votes" data-method="post" direction="up" rel="nofollow">vote up</a>
但點擊的時候提示No route matches [GET] "/posts/2/votes"
還是使用get方式
請問如何修改呢
<%= link_to "vote up",post_votes_path(post),direction:"up", :method => :post, :remote => true %>