|
|
@ -42,6 +42,19 @@ class WordsController < ApplicationController
|
|
|
|
def create_reply
|
|
|
|
def create_reply
|
|
|
|
find_user
|
|
|
|
find_user
|
|
|
|
@params = params
|
|
|
|
@params = params
|
|
|
|
|
|
|
|
parent_id = params[:reference_id]
|
|
|
|
|
|
|
|
author_id = User.current.id
|
|
|
|
|
|
|
|
reply_user_id = params[:reference_user_id]
|
|
|
|
|
|
|
|
# reply_id = nil # 暂时不实现
|
|
|
|
|
|
|
|
content = params[:user_notes]
|
|
|
|
|
|
|
|
@params.merge({flag:'====', parent_id: parent_id, author_id: author_id, reply_user_id: reply_user_id, content: content})
|
|
|
|
|
|
|
|
JournalsForMessage.new( :user_id => author_id,
|
|
|
|
|
|
|
|
:m_parent_id => parent_id,
|
|
|
|
|
|
|
|
:reply_id => reply_user_id,
|
|
|
|
|
|
|
|
:notes => content,
|
|
|
|
|
|
|
|
:is_readed => false
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
respond_to do |format|
|
|
|
|
respond_to do |format|
|
|
|
|
format.html {render 'test/index'}
|
|
|
|
format.html {render 'test/index'}
|
|
|
|
format.js
|
|
|
|
format.js
|
|
|
|