small fix for journal_pages desktop

This commit is contained in:
Harry Bomrah committed 2012-11-21 17:11:18 +08:00
1 parent b571373c8f
commit c94940214c
5 files changed
+11 -13

No files matched your search

@@ -35,18 +35,18 @@ class Desktop::JournalPagesController < ApplicationController
end
def create
if params[:commit].eql?"Save"
params[:writing_journal][:create_user_id] = current_user.id
@writing_journal = WritingJournal.new(params[:writing_journal])
respond_to do |format|
if @writing_journal.save
format.json {render json: {success: true, msg: "Paper successfully saved!"}.to_json}
else
format.json {render json: {success: false, msg: "Saving failed!"}.to_json }
if @writing_journal.save
format.json {render json: {success: true, msg: "Paper successfully saved!"}.to_json}
else
format.json {render json: {success: false, msg: "Saving failed!"}.to_json }
end
end
end
end
end
def update