aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/link_to_helper.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-02-13 14:47:22 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-02-15 12:22:22 +1100
commit20a1a5fb38f0a4ec621c93e41a9565971827b429 (patch)
tree8eb8362ef54a2a481b608c8b28b99ba06c56a5f7 /app/helpers/link_to_helper.rb
parent6c45f6f80e306bf06354c2becc0f3293af46fbcd (diff)
Make link to follow up message relative
Diffstat (limited to 'app/helpers/link_to_helper.rb')
-rwxr-xr-xapp/helpers/link_to_helper.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index 1463096e8..5c9f51baa 100755
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -53,14 +53,17 @@ module LinkToHelper
end
# Respond to request
- def respond_to_last_url(info_request)
+ def respond_to_last_url(info_request, options = {})
last_response = info_request.get_last_response
if last_response.nil?
- respond_url = show_response_no_followup_url(:id => info_request.id)
+ show_response_no_followup_url(options.merge(:id => info_request.id))
else
- respond_url = show_response_url(:id => info_request.id, :incoming_message_id => last_response.id)
+ show_response_url(options.merge(:id => info_request.id, :incoming_message_id => last_response.id))
end
- return respond_url
+ end
+
+ def respond_to_last_path(info_request)
+ respond_to_last_url(info_request, :only_path => true)
end
# Public bodies