aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/link_to_helper.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-02-13 16:24:43 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-02-15 12:22:22 +1100
commita5e2adf08cdcea0bec25e14b83584091edfb79fb (patch)
tree5eefcb37ad57b535ef15085fd5321138030669cc /app/helpers/link_to_helper.rb
parentf54aaf27a19739b44c5ec032a4b1b2b172074a9c (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.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index 6af0b9a29..48423ff45 100755
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -44,14 +44,26 @@ module LinkToHelper
return request_url(incoming_message.info_request, options.merge(:anchor => "incoming-#{incoming_message.id}"))
end
+ def incoming_message_path(incoming_message)
+ incoming_message_url(incoming_message, :only_path => true)
+ end
+
def outgoing_message_url(outgoing_message, options = {})
return request_url(outgoing_message.info_request, options.merge(:anchor => "outgoing-#{outgoing_message.id}"))
end
+ def outgoing_message_path(outgoing_message)
+ outgoing_message_url(outgoing_message, :only_path => true)
+ end
+
def comment_url(comment, options = {})
return request_url(comment.info_request, options.merge(:anchor => "comment-#{comment.id}"))
end
+ def comment_path(comment)
+ comment_url(comment, :only_path => true)
+ end
+
# Respond to request
def respond_to_last_url(info_request, options = {})
last_response = info_request.get_last_response