deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@redhat.com
Subject [PATCH 5/5] Fix typo in link_to_documentation (/api/docs for html interface)
Date Wed, 02 Mar 2011 20:04:38 GMT
From: marios <marios@redhat.com>

---
 .../lib/deltacloud/helpers/application_helper.rb   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/server/lib/deltacloud/helpers/application_helper.rb b/server/lib/deltacloud/helpers/application_helper.rb
index 191a0c9..124c56c 100644
--- a/server/lib/deltacloud/helpers/application_helper.rb
+++ b/server/lib/deltacloud/helpers/application_helper.rb
@@ -170,7 +170,7 @@ module ApplicationHelper
   def link_to_documentation
     return '' unless request.env['REQUEST_URI']
     uri = request.env['REQUEST_URI'].dup
-    uri.gsub!('/api/', '/api/docs/')
+    uri.gsub!('/api', '/api/docs/') unless uri.include?("docs") #i.e. if already serving
under /api/docs, leave it be
     '<a href="%s">[ Documentation ]</a>' % uri
   end
 
-- 
1.7.3.4


Mime
View raw message