title: how to make a clickable link to sort a table on webpage , ror
body: <p>I am new to the ROR, and I am trying out some basic syntax</p>
  
  <p>If I have a table of records display all my record at index.html.haml. And I want to make it sortable by some attributes of the table. </p>
  
  <p>For examples</p>
  
  <h2>name   age</h2>
  
  <p>bing  32 <br>
  gee   20</p>
  
  <p>I want to make the name and the age is clickable, so that i can sort the table by that key.
  The problem is I am confused about the logics.</p>
  
  <p>What I got so far is I know that I have to modified the index.html.haml , and then send back  some data to the controller, and then the controller to do some sort of ruby sorting, and then send back the table to the view.</p>
  
  <p>can somebody provide some guidances how the implmenetation level work.</p>