move dstinguish origin message into private method
This commit is contained in:
parent
2070e9dc7f
commit
a7c6461f03
|
@ -54,8 +54,7 @@ class WordsController < ApplicationController
|
||||||
:reply_id => reply_user_id,
|
:reply_id => reply_user_id,
|
||||||
:notes => content,
|
:notes => content,
|
||||||
:is_readed => false}
|
:is_readed => false}
|
||||||
@obj = obj_distinguish_url_origin
|
@jfm = add_reply_adapter options
|
||||||
@jfm = add_reply_adapter @obj, options
|
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
# format.html {
|
# format.html {
|
||||||
|
@ -187,7 +186,8 @@ class WordsController < ApplicationController
|
||||||
obj
|
obj
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_reply_adapter obj, options
|
def add_reply_adapter options
|
||||||
|
obj = obj_distinguish_url_origin
|
||||||
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