Class: Admin::UsersController

Inherits:
ResourceController
  • Object
show all
Defined in:
app/controllers/admin/users_controller.rb

Instance Method Summary collapse

Instance Method Details

#ensure_deletableObject



13
14
15
16
17
18
# File 'app/controllers/admin/users_controller.rb', line 13

def ensure_deletable
  if current_user.id.to_s == params[:id].to_s
    announce_cannot_delete_self
    redirect_to admin_users_url
  end
end

#showObject



9
10
11
# File 'app/controllers/admin/users_controller.rb', line 9

def show
  redirect_to edit_admin_user_path(params[:id])
end