Anthony Ettinger
2008-Sep-26 00:26 UTC
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 Ettinger 408-656-2473 http://anthony.ettinger.name --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---