small fix for journal_pages desktop
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user