Thumbs_up gem rails - how to take back a vote?
问题 I finally got my votes being submitted correctly via ajax, however I can' seem to unvote at all. Here's my models: class User < ActiveRecord::Base acts_as_voter end class Vendor < ActiveRecord::Base acts_as_voteable end My routes: resources :vendors do collection do post :vote_for_vendor delete :vote_against_vendor end end My controller: class VendorsController < ApplicationController def vote_for_vendor begin vendor = Vendor.find(params[:vendor_id]) current_user.vote_for(vendor) render