Fix admin entity decoration

This commit is contained in:
2024-03-29 13:48:24 +11:00
parent 1364d78f29
commit 59f42c235c
8 changed files with 370 additions and 6 deletions

View File

@@ -4,11 +4,11 @@ module Admin
class New < Admin::View
include Deps["repos.tag_repo"]
expose :tag do |id:|
expose :post_tag do |id:|
tag_repo.fetch(id)
end
expose :tags do |id:|
expose :post_tags do |id:|
tag_repo.list.reject { |t| t.id.to_s == id.to_s }
end
end

View File

@@ -16,7 +16,7 @@ module Admin
expose :posts do |trip|
post_repo.created_between(trip.start_date, trip.end_date).map do |post|
Adamantium::Decorators::Posts::Decorator.new(post)
Admin::Decorators::Posts::Decorator.new(post)
end
end
end