deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1233316 - /deltacloud/trunk/server/lib/deltacloud/server.rb
Date Thu, 19 Jan 2012 12:26:03 GMT
Author: mfojtik
Date: Thu Jan 19 12:26:03 2012
New Revision: 1233316

URL: http://svn.apache.org/viewvc?rev=1233316&view=rev
Log:
EC2: Fixed variable name when rendering view after launching multiple instances (DTACLOUD-79)

Modified:
    deltacloud/trunk/server/lib/deltacloud/server.rb

Modified: deltacloud/trunk/server/lib/deltacloud/server.rb
URL: http://svn.apache.org/viewvc/deltacloud/trunk/server/lib/deltacloud/server.rb?rev=1233316&r1=1233315&r2=1233316&view=diff
==============================================================================
--- deltacloud/trunk/server/lib/deltacloud/server.rb (original)
+++ deltacloud/trunk/server/lib/deltacloud/server.rb Thu Jan 19 12:26:03 2012
@@ -477,7 +477,7 @@ END
     control do
       @instance = driver.create_instance(credentials, params[:image_id], params)
       if @instance.kind_of? Array
-        @instances = @instance
+        @elements = @instance
         action_handler = "index"
       else
         response['Location'] = instance_url(@instance.id)
@@ -487,14 +487,14 @@ END
       respond_to do |format|
         format.xml  { haml :"instances/#{action_handler}" }
         format.json do
-          if @instances
-            convert_to_json(:instances, @instances)
+          if @elements
+            convert_to_json(:instances, @elements)
           else
-            convert_to_json(:instance, @instance)
+            convert_to_json(:instance, @elements)
           end
         end
         format.html do
-          if @instances
+          if @elements
             haml :"instances/index"
           elsif @instance and @instance.id
             response['Location'] = instance_url(@instance.id)



Mime
View raw message