14 lines
231 B
Ruby
14 lines
231 B
Ruby
module Admin
|
|
module Repos
|
|
class BookRepo < Adamantium::DB::Repo[:posts]
|
|
commands :create, update: :by_pk
|
|
|
|
def list_all
|
|
posts
|
|
.where(post_type: "book")
|
|
.to_a
|
|
end
|
|
end
|
|
end
|
|
end
|