Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tech : déplace une validation sur le groupe d'instructeurs défaut du controleur au modèle #9392

Merged
merged 2 commits into from
Aug 31, 2023

Conversation

E-L-T
Copy link
Contributor

@E-L-T E-L-T commented Aug 4, 2023

PR de refacto :

  • La validation qui empêche de désactiver le groupe d'instructeurs défaut passe du controleur au modèle.
  • L'autre validation, qui vérifie qu'il y a au moins un groupe actif, est enlevée, parce que c'est un doublon de la précédente

@what-the-diff
Copy link

what-the-diff bot commented Aug 4, 2023

PR Summary

  • Modification to app/controllers/administrateurs/groupe_instructeurs_controller.rb
    The former condition which was responsible for checking if a specific user group is the default was eliminated. Now, the status of a user group is always updated, following which the user is redirected to the corresponding page.

  • Changes to app/models/groupe_instructeur.rb
    The validation process for a user group's status was altered. If the user group is equal to the procedure's default group, the status attribute must be validated. If it doesn't pass the validation, an error message occurs.

  • Update on config/locales/models/groupe_instructeur/fr.yml
    The error message regarding the status attribute was removed. A new one for the default attribute was introduced.

  • Test case modification in spec/models/groupe_instructeur_spec.rb
    Adjustments were made to the test cases associated with the validation of active user groups.

@E-L-T E-L-T force-pushed the move-groupe-instructeur-validation-to-model branch 5 times, most recently from 3d18f41 to 7532635 Compare August 4, 2023 14:49
@E-L-T E-L-T force-pushed the move-groupe-instructeur-validation-to-model branch 5 times, most recently from ae4d14f to fa5c6ad Compare August 21, 2023 14:07
@E-L-T E-L-T force-pushed the move-groupe-instructeur-validation-to-model branch from fa5c6ad to 03202f3 Compare August 21, 2023 14:32
@E-L-T E-L-T marked this pull request as ready for review August 21, 2023 14:32
@LeSim LeSim added this pull request to the merge queue Aug 31, 2023
Merged via the queue into main with commit 3e19367 Aug 31, 2023
@LeSim LeSim deleted the move-groupe-instructeur-validation-to-model branch August 31, 2023 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants