diff --git a/app/controllers/admin/import_data_controller.rb b/app/controllers/admin/import_data_controller.rb index ae33d4da..711cf40e 100644 --- a/app/controllers/admin/import_data_controller.rb +++ b/app/controllers/admin/import_data_controller.rb @@ -332,6 +332,7 @@ def sync_conference_data def sync_journal_paper_data + @journal_data = WritingJournal.where(create_user_id: "#{params[:user_id]}") @journal_data.delete_all @user = User.find("#{params[:user_id]}") @@ -400,7 +401,13 @@ def sync_conference_data end end - redirect_to request.referer + + respond_to do |format| + + format.html { redirect_to request.referer } + format.json { render json: {"success"=>true}.to_json} + + end end def sync_book_data @@ -444,7 +451,13 @@ def sync_book_data end end end - redirect_to request.referer + + respond_to do |format| + + format.html { redirect_to request.referer } + format.json { render json: {"success"=>true}.to_json} + + end end