Commit 732eb328 authored by Tugce Nur Tas's avatar Tugce Nur Tas Committed by Tuğçe Nur Taş
Browse files

complete adding destroy method

parent e2db15f2
class UsersController < ApplicationController
before_action :set_user, only: [:show, :edit, :update]
before_action :set_user, only: [:show, :edit, :update, :destroy]
after_action :verify_authorized
def index
......@@ -31,6 +31,6 @@ class UserPolicy < ApplicationPolicy
def destroy?
@current_user.admin_or_superadmin? && @current_user != @user
Rails.application.routes.draw do
devise_for :users
resources :users, except: :destroy
resources :users
resources :clients
resources :profiles, except: [:destroy, :index]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment