add basic user revert functionality
This commit is contained in:
15
app/controllers/user_reverts_controller.rb
Normal file
15
app/controllers/user_reverts_controller.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class UserRevertsController < ApplicationController
|
||||
before_filter :janitor_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
|
||||
|
||||
Reference in New Issue
Block a user