#encoding: utf-8 module ContestantWorksHelper def get_status status str = "" case status when 0 str = "未提交" when 1 str = "已提交" when 2 str = "迟交" end str end end