This commit is contained in:
yanxd 2013-12-25 10:09:21 +08:00
parent 5b6f3b602a
commit a53e18dcc5
2 changed files with 14 additions and 1 deletions

View File

@ -42,6 +42,19 @@ class WordsController < ApplicationController
def create_reply
find_user
@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|
format.html {render 'test/index'}
format.js

View File

@ -40,7 +40,7 @@
<%= render :partial => 'words/new_respond', :locals => {:journal => journal} %>
</div>
<div>
<%= render :partial => "words/journal_reply", :locals => {:journal => journal} %>
<%#= render :partial => "words/journal_reply", :locals => {:journal => journal} %>
</div>
<div class="line_under"></div>
<% end %>