hensei-api/app/controllers/api/v1
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_controller.rb Move n+1 detection to around_action hook 2025-02-09 18:04:59 -08:00
characters_controller.rb February 2023 Update (#48) 2023-02-04 23:46:12 -08:00
favorites_controller.rb Refactor FavoritesController for blueprinter 2022-12-21 16:10:53 -08:00
grid_characters_controller.rb Improve handling mastery bonuses 2025-02-09 18:10:12 -08:00
grid_summons_controller.rb Add support for weapon transcendence (#142) 2024-01-15 14:05:17 -08:00
grid_weapons_controller.rb Add support for weapon transcendence (#142) 2024-01-15 14:05:17 -08:00
guidebooks_controller.rb Adds guidebooks and gacha tables (#95) 2023-06-04 22:23:34 -07:00
import_controller.rb Jedmund/import (#167) 2025-01-17 12:02:12 -08:00
job_accessories_controller.rb February 2023 Update (#48) 2023-02-04 23:46:12 -08:00
job_skills_controller.rb Updated getting skills assignable to a job 2022-12-22 23:26:23 -08:00
jobs_controller.rb Assorted updates (#146) 2025-01-08 12:19:19 -08:00
parties_controller.rb Optimize party loading by adding eager loading to set_from_slug 2025-02-09 18:00:14 -08:00
raids_controller.rb Add raids#show (#145) 2024-02-21 23:25:11 -05:00
search_controller.rb Add support for weapon transcendence (#142) 2024-01-15 14:05:17 -08:00
summons_controller.rb February 2023 Update (#48) 2023-02-04 23:46:12 -08:00
users_controller.rb Implement roles and visibility (#128) 2023-08-25 15:53:56 -07:00
weapon_keys_controller.rb Hotfix so weapon key search translates ints to arrays (#140) 2023-12-30 06:20:22 -08:00
weapons_controller.rb February 2023 Update (#48) 2023-02-04 23:46:12 -08:00