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.
17 lines
535 B
Ruby
17 lines
535 B
Ruby
# frozen_string_literal: true
|
|
|
|
class PostEventsController < ApplicationController
|
|
respond_to :html, :xml, :json
|
|
|
|
def index
|
|
if post_id = params[:post_id] || params.dig(:search, :post_id)
|
|
@post = Post.find(post_id)
|
|
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, :media_asset, :old_media_asset]) if request.format.html?
|
|
|
|
respond_with(@post_events)
|
|
end
|
|
end
|