Files
danbooru/app/controllers/maintenance/user/count_fixes_controller.rb
evazion a7dc05ce63 Enable frozen string literals.
Make all string literals immutable by default.
2021-12-14 21:33:27 -06:00

19 lines
431 B
Ruby

# frozen_string_literal: true
module Maintenance
module User
class CountFixesController < ApplicationController
def new
@user = authorize CurrentUser.user, :fix_counts?
end
def create
@user = authorize CurrentUser.user, :fix_counts?
CurrentUser.user.refresh_counts!
flash[:notice] = "Counts have been refreshed"
redirect_to profile_path
end
end
end
end