fixed error object

This commit is contained in:
Saurabh Bhatia 2014-07-10 18:23:57 +08:00
parent 5992be0d19
commit 886bf12b98
1 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ class Admin::JournalPapersController < OrbitMemberController
format.xml { render :xml => @journal_paper, :status => :created, :location => @journal_paper }
else
format.html { render action: 'new' }
format.json { render json: @extension.errors, status: :unprocessable_entity }
format.json { render json: @journal_paper.errors, status: :unprocessable_entity }
end
end
end
@ -61,7 +61,7 @@ class Admin::JournalPapersController < OrbitMemberController
format.xml { head :ok }
else
format.html { render action: "edit" }
format.json { render json: @extension.errors, status: :unprocessable_entity }
format.json { render json: @journal_paper.errors, status: :unprocessable_entity }
end
end
end