diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index b88ecf775..ec224515b 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -299,7 +299,8 @@ class PollController < ApplicationController def commit_answer pq = PollQuestion.find(params[:poll_question_id]) if has_commit_poll?(@poll.id,User.current.id) && (!User.current.admin?) - render :json => {:text => "failure"} + @percent = get_percent(@poll,User.current) + render :json => {:text => "ok" ,:percent => format("%.2f" ,@percent)} return end if pq.question_type == 1