From 453828401e73adcbf17055679ad04fc59fcb7a55 Mon Sep 17 00:00:00 2001 From: serag Date: Tue, 22 Apr 2014 17:06:23 +0200 Subject: [PATCH] Issue #206 Added Documentation --- tutor/app/controllers/lecturers_controller.rb | 6 ++++++ tutor/app/controllers/students_controller.rb | 6 ++++++ tutor/app/controllers/teaching_assistants_controller.rb | 6 ++++++ tutor/app/views/students/show.html.erb | 2 +- tutor/config/routes.rb | 3 ++- 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/tutor/app/controllers/lecturers_controller.rb b/tutor/app/controllers/lecturers_controller.rb index a64d7975..ca54b670 100644 --- a/tutor/app/controllers/lecturers_controller.rb +++ b/tutor/app/controllers/lecturers_controller.rb @@ -1,4 +1,10 @@ class LecturersController < ApplicationController + # [Profile - Story 5.8] + # Displays the profile of the lecturer chosen + # Parameters: + # id: the Lecturer's id + # Returns: none + # Author: Serag def show @lecturer = Lecturer.find(params[:id]) end diff --git a/tutor/app/controllers/students_controller.rb b/tutor/app/controllers/students_controller.rb index 84bf342d..cccc69d3 100644 --- a/tutor/app/controllers/students_controller.rb +++ b/tutor/app/controllers/students_controller.rb @@ -1,4 +1,10 @@ class StudentsController < ApplicationController + # [Profile - Story 5.8] + # Displays the profile of the student chosen + # Parameters: + # id: the Student's id + # Returns: none + # Author: Serag def show @student = Student.find(params[:id]) end diff --git a/tutor/app/controllers/teaching_assistants_controller.rb b/tutor/app/controllers/teaching_assistants_controller.rb index 10e2e7c9..a89b1d1e 100644 --- a/tutor/app/controllers/teaching_assistants_controller.rb +++ b/tutor/app/controllers/teaching_assistants_controller.rb @@ -1,4 +1,10 @@ class TeachingAssistantsController < ApplicationController + # [Profile - Story 5.8] + # Displays the profile of the teaching assistant chosen + # Parameters: + # id: the Teaching Assistant's id + # Returns: none + # Author: Serag def show @teaching_assistant = TeachingAssistant.find(params[:id]) end diff --git a/tutor/app/views/students/show.html.erb b/tutor/app/views/students/show.html.erb index d679ca3d..7fb72cfc 100644 --- a/tutor/app/views/students/show.html.erb +++ b/tutor/app/views/students/show.html.erb @@ -66,7 +66,7 @@ - CoolSoft - Java tutor | <%= @student.id%>'s Profile + <%= @student.id%>'s Profile

<%= @student.name%>'s Profile

diff --git a/tutor/config/routes.rb b/tutor/config/routes.rb index a82a9f2a..db026e0a 100644 --- a/tutor/config/routes.rb +++ b/tutor/config/routes.rb @@ -88,4 +88,5 @@ # # Directs /admin/products/* to Admin::ProductsController # # (app/controllers/admin/products_controller.rb) # resources :products - # end \ No newline at end of file + # end +end \ No newline at end of file