generated from betagouv/rails-template
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Refactor amounts calculation #1188
Merged
Merged
Changes from 12 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e8073ac
Move calculation methods from concern to manager object to first remo…
pskl ee82f9f
Rm pfmp amount calculator, move tests to pfmp_manager_spec
pskl 8b850cd
Update day count through PfmpManager
pskl 60799fe
Update all pfmps params through manager to make it consistent
pskl e18305d
Merge branch 'main' into chore/refactor-amount-update
pskl efb3065
Add validation on amounts
pskl 2d7daf4
Amend specs
pskl 03ad732
Fix specs
pskl 38f9ca1
Merge branch 'main' into chore/refactor-amount-update
pskl d60db59
Remove auto transition!
pskl 47bec3c
Fix bad merge
pskl 0885fdf
Add pessimistic locking for all related pfmps for a given mef
pskl d96b7c6
Remove useless rebalance
pskl 6b417b6
Make recalculate_amounts a private method of the manager
pskl fafc857
Make calculate_amount a private method
pskl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
La fonction 'create' et 'update' n'avaient pas la même condition initialement, mais maintenant elles vérifient toutes les 2 'PfmpManager.new(@PFMP).update(pfmp_params)', est-ce normal ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oui normalement c'est équivalent parce que
#update
et#save
retournent true quand les validations sont passées et false quand ca n'est pas le cas. Et ici on veut juste déclencher explicitement le recalcul.