app/views/students/index.html.haml
%h1 Listing students
%table.table.table-responsive
%tr
%th First
%th Last
%th Classroom
%th
%th
%th
- @students.each do |student|
%tr
%td= student.first_name
%td= student.last_name
%td= student.classroom.try(:name)
%td= link_to 'Show', student
%td= link_to 'Edit', edit_student_path(student)
%td= link_to 'Destroy', student, :method => :delete, :data => { :confirm => 'Are you sure?' }