eBooru/app/controllers/maintenance/user/count_fixes_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
364 B
Ruby

# frozen_string_literal: true
module Maintenance
module User
class CountFixesController < ApplicationController
before_action :member_only
def new
end
def create
CurrentUser.user.refresh_counts!
flash[:notice] = "Counts have been refreshed"
redirect_to user_path(CurrentUser.id)
end
end
end
end