修复课程作业留言回复报500的BUG

产生原因:截取路由正则表达式有误
解决方案:修正正则表达式
This commit is contained in:
sw 2014-10-14 15:37:06 +08:00
parent 7529a944cf
commit 64ee96b526
1 changed files with 1 additions and 1 deletions

View File

@ -236,7 +236,7 @@ class WordsController < ApplicationController
#modify by nwb
#添加对课程留言的支持
referer = request.headers["Referer"]
obj_id = referer.match(%r(/([0-9]{1,})(/|$)))[1]
obj_id = referer.match(%r(/([0-9]{1,})(/|\?|$)))[1]
if referer.match(/project/)
obj = Project.find_by_id(obj_id)
elsif referer.match(/course/)