title: Conditionally setting CSS style from ruby controller
body: <p>I'm trying to dynamically change (if it got clicked) a normal table header (which is a link) to another defined CSS class 'th.hilite'. This link simply sorts this column and the header should got highlighted every time a user sorts the list. </p>
  
  <p>The view where the class in question should be changed, looks like this:</p>
  
  <pre><code>%table#mytable
    %thead
      %tr
        %th= link_to 'Title', mytable_path(:sort =&gt; 'title'), :id =&gt; 'title_header'
  </code></pre>
  
  <p>My question is simply: <strong>How and where could I dynamically set the class to %th.hilite if the header is clicked?</strong></p>