CyberCraftInc / vacation_system

Cyber Craft Vacation System
0 stars 0 forks source link

Add ApprovalRequestsController#accept action method #18

Closed eleidan closed 9 years ago

eleidan commented 9 years ago

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

afurm commented 9 years ago

LGTM

rubycop commented 9 years ago

+