Update RoR router
The following action methods are members of :approval_requests
resources:
accept,
decline.
Update :vacation_request factory
Add :with_approval_requests trait that creates approval requests
assigned to team managers.
Add tests for ApprovalRequestsController
The following action methods are tested:
accept,
decline.
Add authorization policy for ApprovalRequest
Add custom error ConflictError
This error is used to implement handy handling of conflicts in
VacationRequest model state.
Update User model
The model provides #manager_of_user?(user) method to verify if the user
is a manager for another user.
Fix custom validation in VacationRequest model
It was not possible to save existing model because of false positive
validation issue.
Now cannot_intersect_with_other_vacations() considers the fact that it
may be used for an existing record and checks the ID of the record.
Update RoR router The following action methods are members of :approval_requests resources:
Update :vacation_request factory Add :with_approval_requests trait that creates approval requests assigned to team managers.
Add tests for ApprovalRequestsController The following action methods are tested:
Add authorization policy for ApprovalRequest
Add custom error ConflictError This error is used to implement handy handling of conflicts in VacationRequest model state.
Update User model The model provides #manager_of_user?(user) method to verify if the user is a manager for another user.
Fix custom validation in VacationRequest model It was not possible to save existing model because of false positive validation issue. Now cannot_intersect_with_other_vacations() considers the fact that it may be used for an existing record and checks the ID of the record.
@alazarchuk , @epmlys , @rubycop, @afurm