Add highlights
This commit is contained in:
12
slices/admin/repos/highlight_repo.rb
Normal file
12
slices/admin/repos/highlight_repo.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
module Admin
|
||||
module Repos
|
||||
class HighlightRepo < Adamantium::Repo[:highlights]
|
||||
commands :create, delete: :by_pk
|
||||
|
||||
def list_all
|
||||
highlights
|
||||
.to_a
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@@ -71,7 +71,7 @@ module Admin
|
||||
|
||||
def find(id:)
|
||||
posts
|
||||
.combine(:tags)
|
||||
.combine(:tags, :highlights)
|
||||
.where(id: id).one!
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user