sample_rails_tailwind/test/fixtures/users.yml
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

23 lines
534 B
YAML

# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
name: MyString
email: MyString
michael:
name: Michael Example
email: michael@example.com
admin: true
password_digest: <%= User.digest('password') %>
archer:
name: Sterling Archer
email: suchess@example.gov
password_digest: <%= User.digest('password') %>
<% 30.times do |n| %>
user_<%= n %>:
name: <%= "user #{n}" %>
email: <%= "user-#{n}@example.com" %>
password_digest: <%= User.digest('password') %>
<% end %>