desktop fix book cant delete
This commit is contained in:
1 parent
198a9f503a
commit
3f56689240
1 file changed
+7
-2
@@ -2,7 +2,8 @@ class Admin::BooksController < OrbitMemberController
|
||||
include Admin::BooksHelper
|
||||
layout "member_plugin"
|
||||
|
||||
before_action :set_book, only: [:show, :edit , :update, :destroy]
|
||||
before_action :set_book, only: [:show, :edit , :update]
|
||||
before_action :find_book, only: [:destroy]
|
||||
before_action :get_plugins, only: [:index, :book_setting, :new, :create, :edit, :update]
|
||||
before_action :set_types, only: [:index,:book_setting, :new, :edit, :create, :update]
|
||||
before_action :set_plugin
|
||||
@@ -156,6 +157,10 @@ class Admin::BooksController < OrbitMemberController
|
||||
@book = Book.find_by(uid: uid)
|
||||
end
|
||||
|
||||
def find_book
|
||||
@book = Book.find_by(id: params[:id])
|
||||
end
|
||||
|
||||
def book_attributes
|
||||
params.require(:book).permit! rescue nil
|
||||
end
|
||||
@@ -172,4 +177,4 @@ class Admin::BooksController < OrbitMemberController
|
||||
@author_types = BookAuthorType.all
|
||||
@book_types = BookType.all
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user