<div class="container">
  <h1>Students overview</h1><br /><br />
  <div class="row-fluid">
    <div class="span8">
      <ul>
        <% @students.each do |student| %>
          <li>
            <div>
              <p><%= link_to student.full_name, student_path(student) %></p>
              <p><%= link_to student.group.name, group_path(student.group.id) %></p>
            </div>
          </li>
        <% end %>
      </ul>
    </div>
    <div class="sidebar span4">
      <p>Not on this list? Register now!</p>
      <%= link_to "register", new_student_path, :class => 'btn btn-primary' %>
    </div>
  </div>
</div>
<div class="container">
  <h1>Students overview</h1><br /><br />
  <div class="row-fluid">
    <div class="span8">
      <ul>
        <% @students.each do |student| %>
          <li>
            <div>
              <p><%= link_to student.full_name, student_path(student) %></p>
              <p><%= link_to student.group.name, group_path(student.group.id) if student.group %></p>
            </div>
          </li>
        <% end %>
      </ul>
    </div>
    <div class="sidebar span4">
      <p>Not on this list? Register now!</p>
      <%= link_to "register", new_student_path, :class => 'btn btn-primary' %>
    </div>
  </div>
</div>
Add conditions for student index
Add conditions for student index

Before there was an error if you wanted to go to the students index site if there weren't any groups yet.