sample_rails_tailwind/db/migrate/20250105095157_add_admin_to_users.rb
songtianlun f2c7d02eed feat: add user deletion functionality
- Implement user destroy action in UsersController
- Add admin check for user deletion
- Update user view to include delete link for admins
- Add migration to add admin attribute to users
- Update tests to cover new admin functionality

This commit introduces the ability for admin users to delete
other users from the system. It includes necessary checks to
ensure that only admins can perform this action, along with
updates to the user interface and tests to validate the
new behavior.
2025-01-05 18:27:13 +08:00

6 lines
132 B
Ruby

class AddAdminToUsers < ActiveRecord::Migration[8.0]
def change
add_column :users, :admin, :boolean, default: false
end
end