fix library

dev_bj
p31729568 5 years ago
parent 92c5f1c925
commit 763dac6cd5

@ -40,7 +40,7 @@ class LibrariesController < ApplicationController
redirect_to publish_success_libraries_path redirect_to publish_success_libraries_path
else else
flash[:message] = '保存成功' flash[:message] = '保存成功'
render 'new' redirect_to edit_library_path(id: @library.id)
end end
rescue ActiveRecord::RecordInvalid => _ rescue ActiveRecord::RecordInvalid => _
render 'new' render 'new'
@ -64,7 +64,7 @@ class LibrariesController < ApplicationController
redirect_to publish_success_libraries_path redirect_to publish_success_libraries_path
else else
flash[:message] = '保存成功' flash[:message] = '保存成功'
render 'edit' redirect_to edit_library_path(id: @library.id)
end end
rescue ActiveRecord::RecordInvalid => _ rescue ActiveRecord::RecordInvalid => _
render 'edit' render 'edit'

Loading…
Cancel
Save