- 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>
51 lines
2.1 KiB
Ruby
51 lines
2.1 KiB
Ruby
Rails.application.routes.draw do
|
|
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
|
|
|
|
# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
|
|
# Can be used by load balancers and uptime monitors to verify that the app is live.
|
|
get "up" => "rails/health#show", as: :rails_health_check
|
|
|
|
# Render dynamic PWA files from app/views/pwa/* (remember to link manifest in application.html.erb)
|
|
# get "manifest" => "rails/pwa#manifest", as: :pwa_manifest
|
|
# get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker
|
|
|
|
# Defines the root path route ("/")
|
|
root "pages#home"
|
|
|
|
# parties page
|
|
get "parties", to: "parties#index", as: "parties"
|
|
get "parties/:slug.:id", to: "parties#show", as: "party"
|
|
|
|
# Routes for devise authentication Gem
|
|
# Bind devise to user
|
|
# devise_for :users
|
|
devise_for :users, path: "auth", path_names: {
|
|
sign_in: "sign_in", # Route for user login
|
|
sign_out: "sign_out", # Route for user logout
|
|
password: "reset-password", # Route for changing password
|
|
confirmation: "verification", # Route for account confirmation
|
|
unlock: "unblock", # Route for account unlock
|
|
# registration: "account", # Route for user account
|
|
sign_up: "signup" # Route for user registration
|
|
},
|
|
controllers: {
|
|
sessions: "authentications/sessions", # Custom controller for sessions
|
|
registrations: "authentications/registrations", # Custom controller for registrations
|
|
passwords: "authentications/passwords", # Custom controller for passwords
|
|
confirmation: "authentications/confirmations" # Custom controller for confirmations
|
|
}
|
|
|
|
# API routes versioning
|
|
namespace :api do
|
|
namespace :v1 do
|
|
# RESTful routes for party management
|
|
resources :parties, only: [ :index, :show, :create, :update, :destroy ]
|
|
# resources :bundles, only: [ :index, :show, :create, :update, :destroy ]
|
|
|
|
|
|
# Additional API endpoints can be added here as needed
|
|
# Example: search, filtering, user-specific endpoints
|
|
end
|
|
end
|
|
end
|