diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/link_to_helper.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb index 4c0516171..e8be14162 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.43 2008-09-24 19:25:50 francis Exp $ +# $Id: link_to_helper.rb,v 1.44 2008-10-03 17:09:06 francis Exp $ module LinkToHelper @@ -38,6 +38,17 @@ module LinkToHelper def comment_url(comment) return request_url(comment.info_request)+"#comment-"+comment.id.to_s end + + # Respond to request + def respond_to_last_url(info_request) + last_response = info_request.get_last_response + if last_response.nil? + respond_url = show_response_no_followup_url(:id => info_request.id) + else + respond_url = show_response_url(:id => info_request.id, :incoming_message_id => last_response.id) + end + return respond_url + end # Public bodies def public_body_url(public_body) |