incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject svn commit: r962183 - /incubator/deltacloud/trunk/server/libexec/lib/deltacloud/helpers/application_helper.rb
Date Thu, 08 Jul 2010 23:34:41 GMT
Author: lutter
Date: Thu Jul  8 23:34:41 2010
New Revision: 962183

URL: http://svn.apache.org/viewvc?rev=962183&view=rev
Log:
* application_helper: the URL's for a collection must not end with a '/'

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

Modified: incubator/deltacloud/trunk/server/libexec/lib/deltacloud/helpers/application_helper.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/libexec/lib/deltacloud/helpers/application_helper.rb?rev=962183&r1=962182&r2=962183&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/libexec/lib/deltacloud/helpers/application_helper.rb
(original)
+++ incubator/deltacloud/trunk/server/libexec/lib/deltacloud/helpers/application_helper.rb
Thu Jul  8 23:34:41 2010
@@ -28,12 +28,7 @@ module ApplicationHelper
            (level == levels[levels.size-2] && levels[levels.size-1].to_i > 0)
           s += "<li class='subsequent'>#{level.gsub(/_/, ' ')}</li>\n" unless
level.to_i > 0
         else
-            link = "/"
-            i = 1
-            while i <= index
-              link += "#{levels[i]}/"
-              i+=1
-            end
+            link = levels.slice(0, index+1).join("/")
             s += "<li class='subsequent'><a href=\"#{link}\">#{level.gsub(/_/,
' ')}</a></li>\n"
         end
       end



Mime
View raw message