2024-02-25 12:15:55 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-10-24 08:47:20 -04:00
|
|
|
class EditHistoriesController < ApplicationController
|
|
|
|
respond_to :html
|
|
|
|
before_action :moderator_only
|
|
|
|
|
|
|
|
def index
|
|
|
|
@edit_history = EditHistory.includes(:user).paginate(params[:page], limit: params[:limit])
|
|
|
|
respond_with(@edit_history)
|
|
|
|
end
|
|
|
|
|
|
|
|
def show
|
2022-11-26 14:19:23 -05:00
|
|
|
@edits = EditHistory.includes(:user).where('versionable_id = ? AND versionable_type = ?', params[:id], params[:type]).order(:id)
|
2020-10-24 08:47:20 -04:00
|
|
|
respond_with(@edits)
|
|
|
|
end
|
|
|
|
end
|