diff options
author | francis <francis> | 2009-01-08 16:57:16 +0000 |
---|---|---|
committer | francis <francis> | 2009-01-08 16:57:16 +0000 |
commit | 8b2b57e8c14944ac8a78d816dec49bd6e05b1640 (patch) | |
tree | 27d9490705c341eff94ab95e97f4b0cacda82766 /app/controllers/application.rb | |
parent | c31d98d81daba4e9b5e2a2f37bbec77cb2b65b76 (diff) |
Default to sorting by newest if the query is structured.
Diffstat (limited to 'app/controllers/application.rb')
-rw-r--r-- | app/controllers/application.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/application.rb b/app/controllers/application.rb index c6f346907..9a1ef035b 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.51 2008-10-07 22:05:06 francis Exp $ +# $Id: application.rb,v 1.52 2009-01-08 16:57:16 francis Exp $ class ApplicationController < ActionController::Base @@ -188,6 +188,8 @@ class ApplicationController < ActionController::Base return ['created_at', true] elsif sortby == 'described' return ['described_at', true] # use this for some RSS + elsif sortby == 'relevant' + return [nil, nil] else raise "Unknown sort order " + @sortby end |