From a7c6461f03cf0dccb692f63eb15aa4e4aec032b8 Mon Sep 17 00:00:00 2001 From: yanxd Date: Tue, 31 Dec 2013 16:09:50 +0800 Subject: [PATCH] move dstinguish origin message into private method --- app/controllers/words_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index 224d44050..bb8e6fb0c 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -54,8 +54,7 @@ class WordsController < ApplicationController :reply_id => reply_user_id, :notes => content, :is_readed => false} - @obj = obj_distinguish_url_origin - @jfm = add_reply_adapter @obj, options + @jfm = add_reply_adapter options respond_to do |format| # format.html { @@ -187,7 +186,8 @@ class WordsController < ApplicationController obj end - def add_reply_adapter obj, options + def add_reply_adapter options + obj = obj_distinguish_url_origin if obj.kind_of? User obj.add_jour(nil, nil, nil, options) elsif obj.kind_of? Project