Refactor micropub specific things out to a slice
This commit is contained in:
15
slices/micropub/repos/podcast_repo.rb
Normal file
15
slices/micropub/repos/podcast_repo.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
module Micropub
|
||||
module Repos
|
||||
class PodcastRepo < Adamantium::Repo[:podcasts]
|
||||
commands :create
|
||||
|
||||
def listing
|
||||
podcasts.order(:name).to_a
|
||||
end
|
||||
|
||||
def delete_all
|
||||
podcasts.delete
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user