# encoding: utf-8 module ExerciseHelper #判断用户是否已经提交了问卷 def has_commit_exercise?(exercise_id, user_id) pu = PollUser.find_by_poll_id_and_user_id(excercise_id, user_id) if pu.nil? false else true end end end