aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/link_to_helper.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-02-13 17:45:59 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-02-15 12:22:23 +1100
commit8e8f8bb435ad66deaf9d7a9eb1ec221fde3540d2 (patch)
tree9d0ef4de6705f37eaa19d30d33269a972aa9843b /app/helpers/link_to_helper.rb
parent448dce2ce597937bb7af006065076c85d11d95ff (diff)
Make links to within the site use relative urls
Diffstat (limited to 'app/helpers/link_to_helper.rb')
-rwxr-xr-xapp/helpers/link_to_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index 6682af0c4..07727a06a 100755
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -236,6 +236,11 @@ module LinkToHelper
return url
end
+
+ def search_path(query, options = {})
+ search_url(query, options.merge(:only_path => true))
+ end
+
def search_link(query, variety_postfix = nil, sort_postfix = nil, advanced = nil)
link_to h(query), search_url(query)
end