Add trips
This commit is contained in:
18
slices/admin/views/trips/show.rb
Normal file
18
slices/admin/views/trips/show.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
module Admin
|
||||
module Views
|
||||
module Trips
|
||||
class Show < Admin::View
|
||||
|
||||
include Deps["repos.trip_repo", "repos.post_repo"]
|
||||
|
||||
expose :trip do |id:|
|
||||
trip_repo.fetch(id)
|
||||
end
|
||||
|
||||
expose :posts do |trip|
|
||||
post_repo.created_between(trip.start_date, trip.end_date)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user