From bf4c75fcdc350ba941d86b46042772634eacf854 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Fri, 16 Nov 2012 01:53:45 +0800 Subject: [PATCH] add new function --- app/controllers/desktop_publications_controller.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/controllers/desktop_publications_controller.rb b/app/controllers/desktop_publications_controller.rb index eca77543..0ea46451 100644 --- a/app/controllers/desktop_publications_controller.rb +++ b/app/controllers/desktop_publications_controller.rb @@ -10,6 +10,12 @@ class DesktopPublicationsController< ApplicationController end def journal_p_add + @writing_journal = WritingJournal.new + +# respond_to do |format| +# format.html # new.html.erb +# format.xml { render :xml => @writing_journal } +# end render "desktop/journal_pages/add", :layout => false end @@ -67,7 +73,9 @@ class DesktopPublicationsController< ApplicationController end def getjournals - publications = WritingJournal.where(:create_user_id => current_user.id) + publications = WritingJournal.where(create_user_id: current_user.id) + p current_user.id +p "=======" sort_publications= Hash.new data = Array.new