Commit Graph

9 Commits

Author SHA1 Message Date
c00e336009 feat: add cities and weather_arts tables
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / scan_js (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
- Create cities table with fields for name, country, latitude, and longitude
- Add featured boolean field to cities table
- Create weather_arts table with fields for weather_date, weather_condition, description, and prompt

These changes enhance the database schema by introducing new tables that will support
future features related to city and weather data management.
2025-01-17 18:08:41 +08:00
42e0da1aa0 feat: add city and weather art models
- Create City model with attributes: name, country, latitude, longitude, and featured.
- Create WeatherArt model with attributes: weather_date, weather_condition, description, and prompt.
- Add migration files for creating cities and weather arts tables.
- Include fixture files for cities and weather arts for testing.
- Add basic test files for both models.

These changes introduce new models and database tables to support
city and weather art data, enabling future features related to
weather information and city management.
2025-01-17 18:05:42 +08:00
43d39c3010 feat: add password reset functionality
- Implement PasswordResetsController with new and create actions
- Add views for new and edit password reset forms
- Update routes to include password reset paths
- Create migration to add reset_digest and reset_send_at to users

This commit introduces a complete password reset feature, allowing
users to request a password reset via email. It includes the
necessary controller actions, views, and database schema updates.
The user experience is enhanced with a link to the password reset
form on the login page.
2025-01-07 18:09:44 +08:00
a54ebdbf23 feat: add account activation feature
- Implement AccountActivationsController for activation logic
- Create UserMailer for sending activation emails
- Update SessionsController to handle unactivated users
- Modify UsersController to restrict access to activated users
- Add activation fields to User model and database migration
- Create views for account activation emails
- Add tests for account activation functionality
2025-01-06 18:38:39 +08:00
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
022eae3029 feat: add pagination to user index view
- Integrate Kaminari for pagination of users
- Update users_controller to paginate users
- Add pagination views for first, last, next, and previous pages
- Seed database with example users for testing

This commit introduces pagination to the user index view, allowing
for better navigation through large sets of users. The Kaminari gem
is utilized to handle pagination, improving the user experience by
reducing load times and enhancing usability. Additionally, the
seeding script has been updated to create multiple users for
better testing of the pagination feature.
2025-01-05 17:50:33 +08:00
ccd6b02a98 feat: add remember me functionality for user sessions
- Implement remember method in User model to generate and store a remember token
- Update SessionsController to call remember on successful login
- Enhance current_user method to retrieve user from cookies if session is not present
- Add forget method to clear remember token on logout
- Create migration to add remember_digest column to users table
2025-01-02 16:47:26 +08:00
cd558466be feat: add user registration functionality
- Add User model with validations for name and email
- Implement UsersController with new action for signup
- Create views for user signup and home page
- Update routes to include signup path
- Add bcrypt gem for password security
- Include tests for user model and controller actions

This commit establishes the foundation for user registration in the application, ensuring proper validation and security measures are in place. It also enhances the user experience by providing a dedicated signup page.
2024-12-31 14:20:22 +08:00
5bd0c44c91 init sample-app 2024-12-29 17:12:54 +08:00