incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1061218 - /incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb
Date Thu, 20 Jan 2011 11:10:45 GMT
Author: mfojtik
Date: Thu Jan 20 11:10:45 2011
New Revision: 1061218

URL: http://svn.apache.org/viewvc?rev=1061218&view=rev
Log:
Fixed link_to helpers to with with Test::Unit

Modified:
    incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb

Modified: incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb?rev=1061218&r1=1061217&r2=1061218&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb Thu Jan
20 11:10:45 2011
@@ -147,6 +147,7 @@ module ApplicationHelper
   end
 
   def link_to_format(format)
+    return '' unless request.env['REQUEST_URI']
     uri = request.env['REQUEST_URI']
     return if uri.include?('format=')
     if uri.include?('?')
@@ -158,6 +159,7 @@ module ApplicationHelper
   end
 
   def link_to_documentation
+    return '' unless request.env['REQUEST_URI']
     uri = request.env['REQUEST_URI'].dup
     uri.gsub!('/api/', '/api/docs/')
     '<a href="%s">[ Documentation ]</a>' % uri



Mime
View raw message