From 886bf12b98003c11408c905eba630e949d35ac03 Mon Sep 17 00:00:00 2001 From: Saurabh Bhatia Date: Thu, 10 Jul 2014 18:23:57 +0800 Subject: [PATCH] fixed error object --- app/controllers/admin/journal_papers_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin/journal_papers_controller.rb b/app/controllers/admin/journal_papers_controller.rb index 380400b..28d6e46 100644 --- a/app/controllers/admin/journal_papers_controller.rb +++ b/app/controllers/admin/journal_papers_controller.rb @@ -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