Repository navigation
Controllers
This application uses four controllers (excluding the application controller).
This is the controller whose actions will be invoked by regular users. Below is a list of actions and their corresponding routes.
-
new (GET /): displays the transfer request form, also is the root path -
create (POST /): creates a new PendingRequest and notifies the administrator -
update_transfer_courses (GET /update_transfer_courses): generates option tags for the other transfer course select tag given a school id via an ajax request
Below is a list of actions accessible only by the administrator.
-
index (GET admin/pending_requests): view all pending requests in the database -
edit (GET admin/pending_requests/:id): review a pending request -
update (PATCH admin/pending_requests/:id): approve or disapprove a pending request, the corresponding request is deleted thereafter -
destroy (DELETE admin/pending_requests/:id): delete a pending request
This is the controller that manages TransferRequests whose actions will be invoked only by the administrator. Below is a list of actions and their corresponding routes.
-
new (GET admin/transfer_requests/new): display form to create a new transfer request -
create (POST admin/transfer_requests): create a new transfer request -
edit (GET admin/transfer_requests/:id/edit): edit a transfer request -
update (PATCH admin/transfer_requests/:id): update a transfer request -
destroy (DELETE admin/transfer_requests/:id): delete a transfer request
This is the controller that manages Schools whose actions will be invoked only by the administrator. Below is a list of actions and their corresponding routes.
-
index (GET admin/schools): display a list of all schools in the database -
new (GET admin/schools/new): display a form to create a new school -
create (POST admin/schools): create a new school -
edit (GET admin/schools/:id/edit): display a form to edit a school -
update (PATCH admin/schools/:id): update an existing school -
destroy (DELETE admin/schools/:id): delete an existing school, its corresponding courses and transfer requests will also be deleted
This is the controller that manages Courses whose actions will be invoked only the administrator. Below is a list of actions and their corresponding routes.
-
new (GET admin/schools/:school_id/courses/new): display a form to create a new course -
create (POST admin/schools/:school_id/courses): create a new course -
edit (GET admin/schools/:school_id/courses/:id): display a form to edit a course -
update (PATCH admin/schools/:school_id/courses/:id): update a course -
destroy (DELETE admin/schools/:school_id/courses/:id): delete a course, its corresponding transfer requests will also be deleted