From d59f7a541c9def14a51edbd3f90402db3e22c726 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 28 Jun 2019 13:45:37 +0800 Subject: [PATCH] fix create library --- app/controllers/libraries_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/libraries_controller.rb b/app/controllers/libraries_controller.rb index a450aede..8d1eeb06 100644 --- a/app/controllers/libraries_controller.rb +++ b/app/controllers/libraries_controller.rb @@ -36,7 +36,7 @@ class LibrariesController < ApplicationController @library = current_user.libraries.new Libraries::SaveService.new(@library, current_user, form_params).call if with_publish? - Libraries::SubmitService.new(current_library).call + Libraries::SubmitService.new(@library).call redirect_to publish_success_libraries_path else flash[:message] = '保存成功' @@ -58,7 +58,7 @@ class LibrariesController < ApplicationController @library = current_library Libraries::SaveService.new(@library, current_user, form_params).call if with_publish? - Libraries::SubmitService.new(current_library).call + Libraries::SubmitService.new(@library).call redirect_to publish_success_libraries_path else flash[:message] = '保存成功'