Sort by column headers in Rails 2.0

hello,

I'm attempting to implement the code created by Dave Burt to sort by column headers shown here:

http://www.koders.com/ruby/fidA98C27CE5EEE13550817B81CF0B07DAADAAA9B37.aspx?s=sort#L1

Well, i wouldn't be writing here if it worked, so I'm wondering if someone could tell me what i'm doing wrong. I keep getting the error, "uninitialized class variable @@sort_keys in SortHelper". Below is my view code that is getting hung up and my controller code. Any advice would help

Dave

## View: <div id="tool-list"> <table cellspacing ="0">   <tr>     <th align="left"><%= link_to_sort_by 'Title', 'title' %></th>     <th align="left">Description</th>     <th align="left"><%= link_to_sort_by 'Status', 'status' %></th>     <th align="left"><%= link_to_sort_by 'Priority', 'priority' %></

    <th align="left"><%= link_to_sort_by 'Owner', 'owner' %></th>     <th align="left"><%= link_to_sort_by 'Eta', 'eta' %></th>   </tr>

## Controller:

class ToolsController < ApplicationController

  helper :sort   include SortHelper

  # the following method should sort columns

  def list # action     SortHelper.columns = %w[       title       status       priority       owner       eta     ]     SortHelper.default_order = %w[title status priority owner eta]     @people = Person.find_all.sort do |a, b|       SortHelper.sort(a, b, @params)     end   end

I can't help with the sort helper, but I did just release a Rails plugin gem to help with setting up sortable tables in Rails: http://sortablecolumns.rubyforge.org/