diff app/helpers/sort_helper.rb @ 523:0b6c82dead28 luisf

Merge from branch "cannam"
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Mon, 25 Jul 2011 14:23:37 +0100
parents cbce1fd3b1b7
children cbb26bc654de
line wrap: on
line diff
--- a/app/helpers/sort_helper.rb	Mon Mar 28 18:17:06 2011 +0100
+++ b/app/helpers/sort_helper.rb	Mon Jul 25 14:23:37 2011 +0100
@@ -200,16 +200,12 @@
     caption = column.to_s.humanize unless caption
     
     sort_options = { :sort => @sort_criteria.add(column.to_s, order).to_param }
-    # don't reuse params if filters are present
-    url_options = params.has_key?(:set_filter) ? sort_options : params.merge(sort_options)
+    url_options = params.merge(sort_options)
     
      # Add project_id to url_options
     url_options = url_options.merge(:project_id => params[:project_id]) if params.has_key?(:project_id)
 
-    link_to_remote(caption,
-                  {:update => "content", :url => url_options, :method => :get},
-                  {:href => url_for(url_options),
-                   :class => css})
+    link_to_content_update(caption, url_options, :class => css)
   end
 
   # Returns a table header <th> tag with a sort link for the named column