Manage books page via admin area
This commit is contained in:
13
slices/admin/repos/book_repo.rb
Normal file
13
slices/admin/repos/book_repo.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
module Admin
|
||||
module Repos
|
||||
class BookRepo < Adamantium::Repo[:posts]
|
||||
commands update: :by_pk
|
||||
|
||||
def list_all
|
||||
posts
|
||||
.where(post_type: "book")
|
||||
.to_a
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user