From b195e043e6a1176e33932f48f67f1ce79b214989 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 3 Dec 2014 18:17:39 +0800 Subject: [PATCH] fix for desktop --- .../admin/writing_conferences_controller.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin/writing_conferences_controller.rb b/app/controllers/admin/writing_conferences_controller.rb index d01287f..a777238 100644 --- a/app/controllers/admin/writing_conferences_controller.rb +++ b/app/controllers/admin/writing_conferences_controller.rb @@ -27,7 +27,7 @@ class Admin::WritingConferencesController < OrbitMemberController @writing_conference = WritingConference.new(conference_params) @writing_conference.save if params[:desktop] == "true" - render json: get_paper_list.to_json + render json: {"data" => get_paper_list}.to_json else redirect_to params['referer_url'] end @@ -45,7 +45,7 @@ class Admin::WritingConferencesController < OrbitMemberController @writing_conference.update_attributes(conference_params) @writing_conference.save if params[:desktop] == "true" - render json: get_paper_list.to_json + render json: {"data" => get_paper_list}.to_json else redirect_to params['referer_url'] end @@ -53,6 +53,12 @@ class Admin::WritingConferencesController < OrbitMemberController def destroy @writing_conference.destroy + respond_to do |format| + format.html { redirect_to(admin_writing_conferences_url) } + # format.xml { head :ok } + format.js + format.json {render json: {"success" => true}} + end end def toggle_hide