I need to sort tables with dynamical content with rails. I could use the RailsCast tutorial (http://railscasts.com/episodes/228-sortable-table-columns) but as I'm not using any specific method in a controller, it doesn't seem appropriate solution.
I found out about the jquery tablesorter, but it doesn't seem to work. Where the solution might be?

<table id="myTable" class="span7">
<tr>
  <th>Name</th>
  <th>Content</th>
  <th>Deadline</th>
  <th>Assignee</th>
  <th></th>
  <th></th>
</tr>
<%= render @project.tasks %>
</table>

application.js

$(document).ready(function(){
  $("#myTable").tablesorter();
});

Where the solution might be?

You might need a <thead> and <tbody>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.