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