Hi,
It's just detail, but when you browse API through browser storage_volumes and storage_snapshots gives you wrong links in breadcumb.
This solve it:
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index aecd62b..48d8e4a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -23,6 +23,7 @@ module ApplicationHelper url = request.path.split('?') #remove extra query string parameters levels = url[0].split('/') #break up url into different levels levels.each_with_index do |level, index| + next if level.tr('_', ' ').eql?('storage') unless level.blank? if index == levels.size-1 || (level == levels[levels.size-2] && levels[levels.size-1].to_i > 0)
- Michal
On Fri, 2010-01-08 at 10:17 +0100, Michal Fojtik wrote:
It's just detail, but when you browse API through browser storage_volumes and storage_snapshots gives you wrong links in breadcumb.
Nice catch ... I wonder though if we shouldn't change the URL structure of the API. Instead of
<link href="http://localhost:3000/api/storage/volumes" rel="storage_volumes"/> <link href="http://localhost:3000/api/storage/snapshots" rel="storage_snapshots"/>
do
<link href="http://localhost:3000/api/storage_volumes" rel="storage_volumes"/> <link href="http://localhost:3000/api/storage_snapshots" rel="storage_snapshots"/>
I don't see the hierarchy implied by the current URL structure.
David
deltacloud-devel@lists.fedorahosted.org