It is nice that you tried to put logic into your models, but in this case, you are repeating the code in question and in answer.  Just think that for every object that is voteable, you will duplicate this code.  You are probably just better off keep it in your controllers.  This code will work for any number of voteable objects:

```ruby
class VotesController < ApplicationController
  def upvote
    @object=params[:class].constantize.find(params[:id])
    @object.votes.create!(:score => 1, :user => current_user)
    redirect_to :back
  end

  # similar for downvote
end