incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "marios@redhat.com" <mandr...@redhat.com>
Subject Re: ['PATCH' 2/4] Adds haml views for buckets and blobs - part of blobstore API
Date Thu, 23 Sep 2010 11:03:44 GMT
Hi David,

On 22/09/10 23:31, David Lutterkort wrote:
> On Mon, 2010-09-20 at 19:52 +0100, mandreou@redhat.com wrote:
>
> Looks good. One question:
>
>> diff --git a/server/views/buckets/show.xml.haml b/server/views/buckets/show.xml.haml
>> new file mode 100644
>> index 0000000..e61470f
>> --- /dev/null
>> +++ b/server/views/buckets/show.xml.haml
>> @@ -0,0 +1,9 @@
>> +!!! XML
>> +%bucket{:href =>  bucket_url(@bucket.id), :id =>  @bucket.id}
>> +  - @bucket.attributes.select{ |attr| attr!=:id }.each do |attribute|
>> +    - unless attribute == :blob_list
>> +      -haml_tag(attribute, :<) do
>> +        - haml_concat @bucket.send(attribute)
>> +  - @bucket.blob_list.each do |blb|
>> +    %blob{:href =>  bucket_url(@bucket.id + blb), :id =>  blb}
>                                           ^^^^^^^^^
>
> Do you really mean that or do you mean bucket_url(@bucket.id) + blb ? Or
> maybe something entirely different ? The Rabbit DSL doesn't have a

:) no i actually meant:

"
%blob{:id => blb, :href => bucket_url(@bucket.id) +"/#{blb}"}
"
thanks fixing before push,

marios


> notion of nesting resources, so it might be easier to just manually
> create helpers like 'blob_in_bucket_url(bucket_id, blob_id)'
>
> David
>
>


Mime
View raw message