diff options
author | francis <francis> | 2008-09-12 08:26:04 +0000 |
---|---|---|
committer | francis <francis> | 2008-09-12 08:26:04 +0000 |
commit | 3beac769bbb92530b51250d871d350f4d85d8db5 (patch) | |
tree | afb76f2f4b61c3df68917de599cd343f13425d53 /app/controllers/application.rb | |
parent | e366aa57a78d3b2d951bf4630a8d437ab8e18cfd (diff) |
Fix bug in call to sort_by_ascending (boolean || true is always true!) in acts_as_xapian
Alter WDTK code to use correct meaning of ascending in Xapian.
Diffstat (limited to 'app/controllers/application.rb')
-rw-r--r-- | app/controllers/application.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/application.rb b/app/controllers/application.rb index 4c3f6e114..ae2c8dd6f 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: application.rb,v 1.49 2008-06-12 13:43:29 francis Exp $ +# $Id: application.rb,v 1.50 2008-09-12 08:26:04 francis Exp $ class ApplicationController < ActionController::Base @@ -183,11 +183,11 @@ class ApplicationController < ActionController::Base # Convert URL name for sort by order, to Xapian query def order_to_sort_by(sortby) if sortby.nil? - return [nil, true] + return [nil, nil] elsif sortby == 'newest' - return ['created_at', false] + return ['created_at', true] elsif sortby == 'described' - return ['described_at', false] # use this for some RSS + return ['described_at', true] # use this for some RSS else raise "Unknown sort order " + @sortby end |