move dstinguish origin message into private method

This commit is contained in:
yanxd 2013-12-31 16:09:50 +08:00
parent 2070e9dc7f
commit a7c6461f03
1 changed files with 3 additions and 3 deletions

View File

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