summaryrefslogtreecommitdiff
path: root/lib/helper.rb
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-05-25 13:52:43 +0200
committerAndreas Maunz <andreas@maunz.de>2011-05-25 13:52:43 +0200
commitb5cf8f9b80303696688144d81a61db758ae8fe9f (patch)
tree74e5b7669db84dd7e1c5e3660553828dfbf68066 /lib/helper.rb
parentd012b9e8da641c342c455a1384ddf3b14f5b5c35 (diff)
parentd5bf9fd2b7f4401c36d00ab6afb1a003fdb07d2f (diff)
Merge branch 'development' into svm_matrix
Diffstat (limited to 'lib/helper.rb')
-rw-r--r--lib/helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/helper.rb b/lib/helper.rb
index 3a6126a..995f3e9 100644
--- a/lib/helper.rb
+++ b/lib/helper.rb
@@ -44,8 +44,9 @@ helpers do
def uri_available?(urlStr)
url = URI.parse(urlStr)
+ subjectidstr = @subjectid ? "?subjectid=#{CGI.escape @subjectid}" : ""
Net::HTTP.start(url.host, url.port) do |http|
- return http.head("#{url.request_uri}?subjectid=#{CGI.escape @subjectid}").code == "200"
+ return http.head("#{url.request_uri}#{subjectidstr}").code == "200"
end
end