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

产生原因:截取路由正则表达式有误
解决方案:修正正则表达式
course_group
sw 11 years ago
parent 7529a944cf
commit 64ee96b526

@ -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/)

Loading…
Cancel
Save