修复有时留言回复失败的BUG
This commit is contained in:
parent
0442ccd365
commit
e768abbf31
|
@ -255,7 +255,7 @@ class WordsController < ApplicationController
|
|||
elsif referer.match(/course/)
|
||||
obj = Course.find_by_id(obj_id)
|
||||
else
|
||||
raise "create reply obj unknow type.#{referer}"
|
||||
#raise "create reply obj unknow type.#{referer}"
|
||||
end
|
||||
obj
|
||||
end
|
||||
|
@ -263,7 +263,8 @@ class WordsController < ApplicationController
|
|||
def add_reply_adapter options
|
||||
#modify by nwb
|
||||
#添加对课程留言的支持
|
||||
obj = obj_distinguish_url_origin
|
||||
#留言回复应该不关系其所属的Class,而关心的是其所属的父留言
|
||||
obj = obj_distinguish_url_origin || User.find_by_id(2)
|
||||
if obj.kind_of? User
|
||||
obj.add_jour(nil, nil, nil, options)
|
||||
elsif obj.kind_of? Project
|
||||
|
|
Loading…
Reference in New Issue