added a few things here. Firstly, I fixed the broken delete function with the admin page. Secondly, whenever you register for this application, we will automatically populate your user data to make the application functional. Seemed like the easiest way to do this
This commit is contained in:
@@ -32,7 +32,7 @@ class AdminController < ApplicationController
|
||||
end
|
||||
|
||||
def delete_user
|
||||
user = User.find_by_id(params[:admin_id])
|
||||
user = User.find_by_user_id(params[:admin_id])
|
||||
if user && !(current_user.user_id == user.user_id)
|
||||
user.delete
|
||||
message = true
|
||||
|
||||
Reference in New Issue
Block a user