aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/link_to_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/link_to_helper.rb')
-rw-r--r--app/helpers/link_to_helper.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index ab8915e5d..bc0bdbafe 100644
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -5,7 +5,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: link_to_helper.rb,v 1.25 2008-04-09 01:32:53 francis Exp $
+# $Id: link_to_helper.rb,v 1.26 2008-04-30 00:37:50 francis Exp $
module LinkToHelper
@@ -81,6 +81,15 @@ module LinkToHelper
link_to h(user.name), user_admin_url(user)
end
+ # General pages
+ def search_url(query, sortby = nil)
+ if sortby.nil?
+ combined = query
+ else
+ combined = query + "/" + sortby
+ end
+ search_general_url(:combined => combined)
+ end
# Admin pages
def admin_url(relative_path)