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
BTW as long as values of your param match column name - no need to code each one
def index @by=params[:by] @movies = Movie.order(params[:by]).all end