eBooru/app/controllers/artist_versions_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

19 lines
530 B
Ruby

# frozen_string_literal: true
class ArtistVersionsController < ApplicationController
respond_to :html, :json
def index
@artist_versions = ArtistVersion.search(search_params).paginate(params[:page], limit: params[:limit], search_count: params[:search])
respond_with(@artist_versions)
end
private
def search_params
permitted_params = %i[name updater_name updater_id artist_id is_active order]
permitted_params += %i[ip_addr] if CurrentUser.is_admin?
permit_search_params permitted_params
end
end