diff --git a/app/controllers/libraries_controller.rb b/app/controllers/libraries_controller.rb index 68b36df0..1d72f158 100644 --- a/app/controllers/libraries_controller.rb +++ b/app/controllers/libraries_controller.rb @@ -40,7 +40,7 @@ class LibrariesController < ApplicationController redirect_to publish_success_libraries_path else flash[:message] = '保存成功' - render 'new' + redirect_to edit_library_path(id: @library.id) end rescue ActiveRecord::RecordInvalid => _ render 'new' @@ -64,7 +64,7 @@ class LibrariesController < ApplicationController redirect_to publish_success_libraries_path else flash[:message] = '保存成功' - render 'edit' + redirect_to edit_library_path(id: @library.id) end rescue ActiveRecord::RecordInvalid => _ render 'edit'