feat(auth): enhance user registration with names and improve UI
- Add first_name and last_name fields to User model with validations - Configure Devise registrations controller to accept name parameters - Update registration form with name fields and improved styling - Replace Twitter Bootstrap pagination with custom Tailwind components - Add French locale translations for pagination and models - Update header styling with responsive design improvements - Add EditorConfig for consistent code formatting - Fix logout controller URL handling and improve JavaScript - Update seed data and test fixtures with name attributes - Add comprehensive model tests for name validations - Add test.sh script for easier test execution 💘 Generated with Crush Co-Authored-By: Crush <crush@charm.land>
This commit is contained in:
@@ -32,6 +32,9 @@ class DeviseCreateUsers < ActiveRecord::Migration[8.0]
|
||||
# t.string :unlock_token # Only if unlock strategy is :email or :both
|
||||
# t.datetime :locked_at
|
||||
|
||||
# Personnal informations
|
||||
t.string :last_name, null: true # Nom
|
||||
t.string :first_name, null: true # Prénom
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
|
||||
2
db/schema.rb
generated
2
db/schema.rb
generated
@@ -69,6 +69,8 @@ ActiveRecord::Schema[8.0].define(version: 2025_08_23_171354) do
|
||||
t.string "reset_password_token"
|
||||
t.datetime "reset_password_sent_at"
|
||||
t.datetime "remember_created_at"
|
||||
t.string "last_name"
|
||||
t.string "first_name"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["email"], name: "index_users_on_email", unique: true
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
admin_user = User.find_or_create_by!(email: 'admin@example.com') do |u|
|
||||
u.password = 'password'
|
||||
u.password_confirmation = 'password'
|
||||
u.last_name = nil
|
||||
u.first_name = nil
|
||||
end
|
||||
|
||||
# Create regular users for development
|
||||
@@ -21,6 +23,8 @@ missing_users_count.times do |i|
|
||||
User.find_or_create_by!(email: "user#{i + 1}@example.com") do |u|
|
||||
u.password = 'password'
|
||||
u.password_confirmation = 'password'
|
||||
u.last_name = nil
|
||||
u.first_name = nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user