Skip to content

Commit

Permalink
Issue #206 Modified Controllers and added primative views
Browse files Browse the repository at this point in the history
  • Loading branch information
serag committed Apr 21, 2014
1 parent bd21b6b commit 9b973df
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions tutor/app/controllers/lecturers_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class LecturersController < ApplicationController
def index
end
def show
@lecturer = Lecturer.find(params[:id])
end
def index
end
end
4 changes: 2 additions & 2 deletions tutor/app/controllers/students_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class StudentsController < ApplicationController
def index
end
def show
@student = Student.find(params[:id])
end
def index
end
end
4 changes: 2 additions & 2 deletions tutor/app/controllers/teaching_assistants_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class TeachingAssistantsController < ApplicationController
def index
end
def show
@teaching_assistant = TeachingAssistant.find(params[:id])
end
def index
end
end
2 changes: 1 addition & 1 deletion tutor/app/views/lecturers/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>CoolSoft - Java Tutor</title>
<title>CoolSoft - Java Tutor | <%= @lecturer.id%>'s Profile</title>
<body>
<h1> I am <%= @lecturer.email%> </h1>
</body>
Expand Down
2 changes: 1 addition & 1 deletion tutor/app/views/students/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>CoolSoft - Java Tutor</title>
<title>CoolSoft - Java tutor | <%= @student.id%>'s Profile</title>
<body>
<h1> I am <%= @student.email%> </h1>
</body>
Expand Down
2 changes: 1 addition & 1 deletion tutor/app/views/teaching_assistants/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>CoolSoft - Java Tutor</title>
<title>CoolSoft - Java Tutor | <%= @teaching_assistant.id%>'s Profile</title>
<body>
<h1> I am <%= @teaching_assistant.email%> </h1>
</body>
Expand Down
4 changes: 2 additions & 2 deletions tutor/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
resources :solutions
resources :problems
resources :topics
resources :students
resources :teaching_assistants
resources :lecturers
resources :teaching_assistants
resources :students

# Example resource route with options:
# resources :products do
Expand Down

0 comments on commit 9b973df

Please sign in to comment.