<table class="table table-bordered table-striped" data-sortable>
  <col width="25%" />
  <thead>
    <tr>
      <th>Exercise</th>
      <th>Language</th>
      <th>Iterations</th>
      <th data-sorted="true" data-sorted-direction="descending">Latest Iteration</th>
    </tr>
  </thead>
  <tbody>
  <% exercises.order(created_at: :desc).each do |exercise| %>
    <tr>
      <td>
        <% if profile.can_access?(exercise) %>
          <a href="/exercises/<%= exercise.key %>">
            <%= exercise.problem.name %>
          </a>
        <% else %>
          <i class="fa fa-lock"></i>
          &nbsp;
          <a href="/exercises/<%= exercise.track_id %>/<%= exercise.slug %>"><%= exercise.problem.name %></a>
        <% end %>
      </td>
      <td><%= exercise.problem.language %></td>
      <td><%= exercise.iteration_count %></td>
      <td data-value="<%= exercise.updated_at.to_i %>"><%= exercise.updated_at.strftime("%m-%d-%Y") %></td>
    </tr>
  <% end %>
  </tbody>
</table>

<table class="table table-bordered table-striped" data-sortable>
  <col width="25%" />
  <thead>
    <tr>
      <th>Exercise</th>
      <th>Language</th>
      <th>Iterations</th>
      <th data-sorted="true" data-sorted-direction="descending">Latest Iteration</th>
    </tr>
  </thead>
  <tbody>
  <% exercises.order(updated_at: :desc).each do |exercise| %>
    <tr>
      <td>
        <% if profile.can_access?(exercise) %>
          <a href="/exercises/<%= exercise.key %>">
            <%= exercise.problem.name %>
          </a>
        <% else %>
          <i class="fa fa-lock"></i>
          &nbsp;
          <a href="/exercises/<%= exercise.track_id %>/<%= exercise.slug %>"><%= exercise.problem.name %></a>
        <% end %>
      </td>
      <td><%= exercise.problem.language %></td>
      <td><%= exercise.iteration_count %></td>
      <td data-value="<%= exercise.updated_at.to_i %>"><%= exercise.updated_at.strftime("%m-%d-%Y") %></td>
    </tr>
  <% end %>
  </tbody>
</table>

Change to sort exercises by updated_at instead of created_at
Change to sort exercises by updated_at instead of created_at

The default sort column on the user show page is by "latest iteration."
The iteration date was displaying correctly, but the sorting was by
exercise creation_date, which coincides with the first submitted
iteration.

Addresses issue #2638
