You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by mf...@redhat.com on 2012/12/14 13:04:52 UTC

[PATCH core 2/4] CIMI: Initialize attribute_values as OrderedHash

From: Michal Fojtik <mf...@redhat.com>


Signed-off-by: Michal fojtik <mf...@redhat.com>
---
 server/lib/cimi/models/base.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/lib/cimi/models/base.rb b/server/lib/cimi/models/base.rb
index 2988459..0708988 100644
--- a/server/lib/cimi/models/base.rb
+++ b/server/lib/cimi/models/base.rb
@@ -181,7 +181,7 @@ class CIMI::Model::Resource
   #
   def initialize(values = {})
     names = self.class.schema.attribute_names
-    @attribute_values = names.inject({}) do |hash, name|
+    @attribute_values = names.inject(OrderedHash.new) do |hash, name|
       hash[name] = self.class.schema.convert(name, values[name])
       hash
     end
-- 
1.8.0.2