Sortable_column_headers plugin not sorting properly?

It appears the default sort direction is always sent to the query,
even if a different column is clicked to sort.

For example:

add_to_sortable_columns(‘search’, :model => Status, :field => ‘name’,
:sort_direction => :desc)

that results in:

ORDER BY statuses.name DESC,directories.updated_at DESC

Being sent everytime, even on the sorting of a different field
altogether.

The default sort order is:

       :order => sortable_order('search',
                                        :model => Directory,
                                        :field => 'updated_at',
                                        :sort_direction => :desc
                                    ),

In other words, no matter what the default sort order is always sent
to the query, and in an un-observable order.


Anthony E.
408-656-2473
http://anthony.ettinger.name