Permalink
Browse files

no longer deletes sort_by and order from params in the sortable_order…

… call - this enables a view template to interrogate those params and e.g. display appropriate icons
  • Loading branch information...
1 parent 9d02664 commit 5758b9c4801640dbc43fad70e73bde67beb9186e Al Davidson committed Nov 3, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sortable_columns.rb
View
@@ -6,7 +6,7 @@ def sortable_order(sortable, options = {})
if params[:sort_by] && params[:order]
validate_params(sortable, params)
store_sort(sortable)
- return "#{params.delete(:sort_by)} #{params.delete(:order)}"
+ return "#{params[:sort_by]} #{params[:order]}"
else
if session[:sortable_columns] && session[:sortable_columns][sortable.to_s.downcase.to_sym]
column = session[:sortable_columns][sortable.to_s.downcase.to_sym].keys.first

0 comments on commit 5758b9c

Please sign in to comment.