Files
danbooru/app/controllers/post_votes_controller.rb
2012-01-06 18:37:08 -05:00

11 lines
226 B
Ruby

class PostVotesController < ApplicationController
before_filter :privileged_only
def create
@post = Post.find(params[:post_id])
@post.vote!(params[:score])
rescue PostVote::Error => x
@error = x
end
end