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

18 lines
328 B
Ruby

# frozen_string_literal: true
class UserRevertsController < ApplicationController
before_action :moderator_only
def new
@user = User.find(params[:user_id])
end
def create
user = User.find(params[:user_id])
revert = UserRevert.new(user.id)
revert.process
redirect_to(user_path(user.id))
end
end