From: Michal Fojtik <[email protected]>

The user_metadata has is not properly serialized to Hash in the Mock
driver. This patch will asure that the user_metadata is hash before
iterate through it.

Signed-off-by: Michal fojtik <[email protected]>
---
 server/views/blobs/show.xml.haml |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/server/views/blobs/show.xml.haml b/server/views/blobs/show.xml.haml
index 34b9cca..686d793 100644
--- a/server/views/blobs/show.xml.haml
+++ b/server/views/blobs/show.xml.haml
@@ -5,7 +5,8 @@
       - haml_tag(attribute, :<) do
         - haml_concat @blob.send(attribute)
   %user_metadata
-    - @blob.user_metadata.each do |k, v|
-      %entry{:key => k}
-        #{cdata v}
+    - if @blob.kind_of? Hash
+      - @blob.user_metadata.each do |k, v|
+        %entry{:key => k}
+          #{cdata v}
   %content{:href => bucket_url(@blob.bucket) + '/' + @blob.id + '/content'}
-- 
1.7.9.1

Reply via email to