From a53e18dcc5cef54bd9a61982afc69bfd2e8bcf96 Mon Sep 17 00:00:00 2001 From: yanxd Date: Wed, 25 Dec 2013 10:09:21 +0800 Subject: [PATCH] zz --- app/controllers/words_controller.rb | 13 +++++++++++++ app/views/words/_message.html.erb | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index 4aa8316af..ee4e24ac7 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -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 diff --git a/app/views/words/_message.html.erb b/app/views/words/_message.html.erb index 40fc71e8c..e6bde6c79 100644 --- a/app/views/words/_message.html.erb +++ b/app/views/words/_message.html.erb @@ -40,7 +40,7 @@ <%= render :partial => 'words/new_respond', :locals => {:journal => journal} %>
- <%= render :partial => "words/journal_reply", :locals => {:journal => journal} %> + <%#= render :partial => "words/journal_reply", :locals => {:journal => journal} %>
<% end %>