replacements: link to old and new media assets.

On the /post_events and /post_replacements pages, include links to the old and new media assets
pages so you can compare the two images.
This commit is contained in:
evazion
2022-11-10 21:53:20 -06:00
parent 6f61abc6a7
commit 0a792fbb8a
4 changed files with 49 additions and 17 deletions

View File

@@ -9,7 +9,7 @@ class PostEventsController < ApplicationController
end
@post_events = authorize PostEvent.paginated_search(params, defaults: { post_id: @post&.id }, count_pages: @post.present?)
@post_events = @post_events.includes(:creator, :post, model: [:post]) if request.format.html?
@post_events = @post_events.includes(:creator, :post, model: [:post, :media_asset, :old_media_asset]) if request.format.html?
respond_with(@post_events)
end