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:
@@ -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
|
||||
|
||||
@@ -31,7 +31,7 @@ class PostReplacementsController < ApplicationController
|
||||
def index
|
||||
params[:search][:post_id] = params.delete(:post_id) if params.key?(:post_id)
|
||||
@post_replacements = authorize PostReplacement.paginated_search(params)
|
||||
@post_replacements = @post_replacements.includes(:creator, post: [:uploader, :media_asset]) if request.format.html?
|
||||
@post_replacements = @post_replacements.includes(:creator, :old_media_asset, :media_asset, post: [:uploader, :media_asset]) if request.format.html?
|
||||
|
||||
respond_with(@post_replacements)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user