Clarification on how to use “thumbs_up” voting gem with Rails 3

后端 未结 3 801
悲&欢浪女
悲&欢浪女 2020-11-30 03:27

I am attempting to implement the thumbs_up voting gem on a Rails 3 app, however the instructions are unclear on the actual implementation. After requiring the gem [g

3条回答
  •  鱼传尺愫
    2020-11-30 04:21

    Routing Error

    No route matches {:action=>"vote_up", :controller=>"microposts", :id=>nil}

    this is the link I am using and assume this is where the routing isn't being specified correctly. I ran rake routes and there is a route called vote_up_micropost. Is there anything else I should look into. Thank you

    here is the link I added

    <%= link_to('vote for this post!',
        vote_up_micropost_path(@microposts),
        :method => :post) %>
    

提交回复
热议问题