Skip to content

Commit

Permalink
#22 Teacher comments system added
Browse files Browse the repository at this point in the history
  • Loading branch information
boraozturk committed Aug 30, 2013
1 parent 14326a7 commit 406d691
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def user
end

def teacher
@profiles = Profile.all
end

private
Expand Down
3 changes: 0 additions & 3 deletions app/views/home/teacher.html.erb

This file was deleted.

29 changes: 29 additions & 0 deletions app/views/home/teacher.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.page-header
.h1
Teacher Home

%h1 Listing users

%table{:class => "table table-hover"}
%tr
%th Name
%th Surname
%th Gender
%th Email
%th
%th

- @profiles.each do |profile|
%tr
%td= profile.name
%td= profile.surname
%td= profile.gender == 'm' ? 'Erkek' : 'Bayan'
%td= profile.user.email

%td
.btn-group
= link_to 'Show', user_path(profile.user)
= link_to 'Edit', edit_user_path(profile.user)
= link_to 'Destroy', profile.user, :method => :delete, :data => { :confirm => 'Are you sure?' }

%br

0 comments on commit 406d691

Please sign in to comment.