Files
adamantium/app/repos/page_repo.rb

12 lines
200 B
Ruby

module Adamantium
module Repos
class PageRepo < Adamantium::Repo[:pages]
def fetch!(slug:)
pages
.published
.where(slug: slug).one!
end
end
end
end