fixed comment vote functional test

This commit is contained in:
albert
2011-04-01 19:01:17 -04:00
parent e7748e1fc9
commit cbd877d020
43 changed files with 135 additions and 20369 deletions

View File

@@ -1,8 +1,15 @@
class CommentVotesController < ApplicationController
rescue_from CommentVote::Error, :with => :error
def create
@comment = Comment.find(params[:comment_id])
@comment.vote!(params[:score])
rescue CommentVote::Error => x
@error = x
render :nothing => true
end
private
def error(exception)
@exception = exception
render :action => "error", :status => 500
end
end