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
Javascript or jquery is not required..
The following HAML will work
%th{:class=>('title' == @sortby)?'hilite':""}= link_to 'Movie Title', movies_path(:sort => 'title'), :id => 'title_header'