This commit is contained in:
parent
5b6f3b602a
commit
a53e18dcc5
|
@ -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
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<%= render :partial => 'words/new_respond', :locals => {:journal => journal} %>
|
<%= render :partial => 'words/new_respond', :locals => {:journal => journal} %>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal} %>
|
<%#= render :partial => "words/journal_reply", :locals => {:journal => journal} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="line_under"></div>
|
<div class="line_under"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue