hensei-api/app/controllers
Justin Edmund dbe7c67b3d Improve handling mastery bonuses
- Improved handling of nested attributes:
  - Replaced old mastery structure with new `rings` and `awakening` assignments.
  - Added `new_rings` and `new_awakening` virtual attributes for easier updates.
  - Updated `assign_attributes` to exclude `rings` and `awakening` to prevent conflicts.

- Enhanced parameter transformation:
  - Introduced `transform_character_params` to process `rings`, `awakening`, and `earring` more reliably.
  - Ensured proper type conversion (`to_i`) for numeric values in `uncap_level`, `transcendence_step`, and `awakening_level`.
  - Improved error handling for missing values by setting defaults where needed.

- Optimized database queries:
  - Added `.includes(:awakening)` to `set` to prevent N+1 query issues.

- Updated strong parameters:
  - Changed `rings` from individual keys (`ring1`, `ring2`, etc.) to a structured array format.
  - Refactored permitted attributes to align with the new nested structure.
2025-02-09 18:10:12 -08:00
..
api/v1 Improve handling mastery bonuses 2025-02-09 18:10:12 -08:00
concerns Restart on Rails 2020-09-14 18:30:54 -07:00
application_controller.rb Remove rabl 2022-12-21 01:16:34 -08:00
tokens_controller.rb Return the user's role in login and user blueprints (#133) 2023-09-09 02:29:32 -07:00