aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/link_to_helper.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-09-05 09:05:04 +0000
committerfrancis <francis>2008-09-05 09:05:04 +0000
commit25c151895f244717931594fdec5cdde7933ec41b (patch)
tree4f734493c851e78c9c2d8bfcf7d83d38fb4fe987 /app/helpers/link_to_helper.rb
parenta3fa7134a03068f078a3d8a69d7de94f4fd8f0bc (diff)
Fixs routing related bugs in search (I think caused by rails upgrade).
Add stuff so when you search for bodies from front page gives different help. Make new front page live.
Diffstat (limited to 'app/helpers/link_to_helper.rb')
-rw-r--r--app/helpers/link_to_helper.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index 294390f5f..33276168e 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.38 2008-08-29 12:52:25 francis Exp $
+# $Id: link_to_helper.rb,v 1.39 2008-09-05 09:05:05 francis Exp $
module LinkToHelper
@@ -106,14 +106,14 @@ module LinkToHelper
end
end
- # General pages
- def search_url(query, sortby = nil)
- if sortby.nil?
- combined = query
- else
- combined = query + "/" + sortby
+ # General pages. postfix is either the sort order, or 'bodies' to show you
+ # came from the front page and are looking for public bodies
+ def search_url(query, postfix = nil)
+ url = search_general_url(:combined => query)
+ if !postfix.nil? && !postfix.empty?
+ url = url + "/" + postfix
end
- search_general_url(:combined => combined)
+ return url
end
# Admin pages