Files
aperonight/app/models/user.rb
Kevin BATAILLE 30f3ecc6ad refactor(events): replace parties concept with events throughout the application
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

This commit refactors the entire application to replace the 'parties' concept with 'events'. All controllers, models, views, and related files have been updated to reflect this change. The parties table has been replaced with an events table, and all related functionality has been updated accordingly.
2025-08-28 13:20:51 +02:00

30 lines
1.3 KiB
Ruby
Executable File

# User model for authentication and user management
# Handles user accounts, authentication, and authorization using Devise
class User < ApplicationRecord
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
#
# Include default devise modules for authentication
# :database_authenticatable - encrypts and stores password in database
# :registerable - allows users to sign up and edit their accounts
# :recoverable - handles password reset functionality
# :rememberable - manages token-based user remembering
# :validatable - provides email and password validation
# Other available modules are:
# :confirmable - requires email confirmation
# :lockable - locks account after failed login attempts
# :timeoutable - expires sessions after inactivity
# :trackable - tracks sign-in count, timestamps, and IP
# :omniauthable - allows authentication via OAuth providers
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :validatable
# Relationships
has_many :events, dependent: :destroy
has_many :tickets, dependent: :destroy
# Validations
validates :last_name, length: { minimum: 3, maximum: 12, allow_blank: true }
validates :first_name, length: { minimum: 3, maximum: 12, allow_blank: true }
end