hensei-api/app
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
..
assets Implement embed images (#173) 2025-01-18 09:08:15 -08:00
blueprints/api/v1 Update raid blueprints 2025-02-09 18:04:43 -08:00
controllers Improve handling mastery bonuses 2025-02-09 18:10:12 -08:00
errors Implement wiki parsers (#121) 2023-08-19 23:05:32 -07:00
jobs More embed image bandaids (#175) 2025-01-18 22:32:13 -08:00
models Remove preview expiry constants 2025-02-07 01:59:53 -08:00
services Update logic and logs 2025-02-07 02:06:40 -08:00