|
|
|
@ -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'
|
|
|
|
|