deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francesco Vollero <fvoll...@redhat.com>
Subject [PATCH core 3/6] tilt problems
Date Mon, 25 Mar 2013 16:57:32 GMT
Signed-off-by: Francesco Vollero <fvollero@redhat.com>
Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/lib/deltacloud/collections/buckets.rb       | 6 +++---
 server/lib/deltacloud/collections/instances.rb     | 2 +-
 server/lib/deltacloud/helpers/deltacloud_helper.rb | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/server/lib/deltacloud/collections/buckets.rb b/server/lib/deltacloud/collections/buckets.rb
index eb3830d..9b60121 100644
--- a/server/lib/deltacloud/collections/buckets.rb
+++ b/server/lib/deltacloud/collections/buckets.rb
@@ -108,8 +108,8 @@ module Deltacloud::Collections
         @blob = driver.create_blob(credentials, bucket_id, blob_id, blob_data, user_meta)
         temp_file.delete
         respond_to do |format|
-          format.xml { haml :"blobs/show" }
-          format.html { haml :"blobs/show" }
+          format.xml  { haml :"blobs/show", :locals=> {blob=>@blob} }
+          format.html { haml :"blobs/show", :locals =>{blob=>@blob} }
           format.json { JSON::dump(:blob => @blob.to_hash(self)) }
         end
       end
@@ -128,7 +128,7 @@ module Deltacloud::Collections
           status 201
           response['Location'] = bucket_url(@bucket.id)
           respond_to do |format|
-            format.xml  { haml :"buckets/show" }
+            format.xml  { haml :"buckets/show", :locals=>{bucket=>@bucket} }
             format.json { JSON::dump(:bucket => @bucket.to_hash(self)) }
             format.html do
               redirect bucket_url(@bucket.id) if @bucket and @bucket.id
diff --git a/server/lib/deltacloud/collections/instances.rb b/server/lib/deltacloud/collections/instances.rb
index ee48f30..dd02981 100644
--- a/server/lib/deltacloud/collections/instances.rb
+++ b/server/lib/deltacloud/collections/instances.rb
@@ -59,7 +59,7 @@ module Deltacloud::Collections
           end
           status 201  # Created
           respond_to do |format|
-            format.xml  { haml :"instances/#{action_handler}" }
+            format.xml  { haml :"instances/#{action_handler}", :locals=>{:instance=>@instance}
}
             format.json do
               if @elements
                 JSON::dump(:instances => @elements.map { |i| i.to_hash(self) })
diff --git a/server/lib/deltacloud/helpers/deltacloud_helper.rb b/server/lib/deltacloud/helpers/deltacloud_helper.rb
index b794560..edcb087 100644
--- a/server/lib/deltacloud/helpers/deltacloud_helper.rb
+++ b/server/lib/deltacloud/helpers/deltacloud_helper.rb
@@ -92,7 +92,7 @@ module Deltacloud::Helpers
       instance_variable_set("@#{model}", @element)
       if @element
         respond_to do |format|
-          format.html { haml :"#{model.to_s.pluralize}/show", :locals=>{model=>@element}
}
+          format.html { haml :"#{model.to_s.pluralize}/show", :locals=>{model=>@element}}
           format.xml { haml :"#{model.to_s.pluralize}/show" , :locals=>{model=>@element}}
           format.json { JSON::dump(model => @element.to_hash(self)) }
         end
-- 
1.8.1.4


Mime
View raw message