small fix for journal_pages desktop

This commit is contained in:
Harry Bomrah authored and chris committed 2012-11-21 18:36:56 +08:00
1 parent 0b9af044ba
commit c53581c999
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