Add Summary to trips

This commit is contained in:
2023-08-27 17:06:20 +10:00
parent ee3703853d
commit 425e93c056
7 changed files with 37 additions and 4 deletions

View File

@@ -1,3 +1,5 @@
require "reverse_markdown"
module Admin
module Views
module Trips
@@ -5,7 +7,11 @@ module Admin
include Deps["repos.trip_repo", "repos.post_repo"]
expose :trip do |id:|
trip_repo.fetch(id)
trip = trip_repo.fetch(id)
end
expose :trip_summary do |trip|
ReverseMarkdown.convert(trip.summary, unknown_tags: :pass_through, github_flavored: true).to_s
end
expose :posts do |trip|