Files
danbooru/app/controllers/post_votes_controller.rb
2013-04-28 00:04:52 -07:00

11 lines
218 B
Ruby

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