eBooru/app/controllers/edit_histories_controller.rb
Earlopain fc7d84affd
[RuboCop] Enable Style/FrozenStringLiteralComment
This reduces allocations on the posts page by about 5%, from basic testing
2024-02-25 18:15:55 +01:00

17 lines
462 B
Ruby

# frozen_string_literal: true
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
@edits = EditHistory.includes(:user).where('versionable_id = ? AND versionable_type = ?', params[:id], params[:type]).order(:id)
respond_with(@edits)
end
end