Files
adamantium/slices/admin/views/posts/show.rb

20 lines
406 B
Ruby

require "reverse_markdown"
module Admin
module Views
module Posts
class Show < Admin::View
include Deps["repos.post_repo"]
expose :post do |id:|
post_repo.find(id: id)
end
expose :markdown_body do |post|
ReverseMarkdown.convert(post.content, unknown_tags: :pass_through, github_flavored: true).to_s
end
end
end
end
end