diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-02-13 16:21:17 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-02-15 12:22:22 +1100 |
commit | f54aaf27a19739b44c5ec032a4b1b2b172074a9c (patch) | |
tree | 49c435d32cff16f9829431a8b1aec43a95f484b3 | |
parent | c8c27e88146bc2761981d7d7e0a04bc3cccfaefd (diff) |
Add options parameter to url helpers
-rwxr-xr-x | app/helpers/link_to_helper.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb index f16af7f0b..6af0b9a29 100755 --- a/app/helpers/link_to_helper.rb +++ b/app/helpers/link_to_helper.rb @@ -40,16 +40,16 @@ module LinkToHelper end # Incoming / outgoing messages - def incoming_message_url(incoming_message) - return request_url(incoming_message.info_request)+"#incoming-"+incoming_message.id.to_s + def incoming_message_url(incoming_message, options = {}) + return request_url(incoming_message.info_request, options.merge(:anchor => "incoming-#{incoming_message.id}")) end - def outgoing_message_url(outgoing_message) - return request_url(outgoing_message.info_request)+"#outgoing-"+outgoing_message.id.to_s + def outgoing_message_url(outgoing_message, options = {}) + return request_url(outgoing_message.info_request, options.merge(:anchor => "outgoing-#{outgoing_message.id}")) end - def comment_url(comment) - return request_url(comment.info_request)+"#comment-"+comment.id.to_s + def comment_url(comment, options = {}) + return request_url(comment.info_request, options.merge(:anchor => "comment-#{comment.id}")) end # Respond to request |