deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [1/3] git commit: CIMI: Fix $select filter to undercore attributes (DTACLOUD-391)
Date Thu, 06 Dec 2012 10:51:56 GMT
Updated Branches:
  refs/heads/master 3a3c33c1b -> 3dd7a0f2d


CIMI: Fix $select filter to undercore attributes (DTACLOUD-391)


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/882ceded
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/882ceded
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/882ceded

Branch: refs/heads/master
Commit: 882cededf1e216abb5c9f04de5046aae9b1da60b
Parents: 3a3c33c
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Wed Dec 5 17:59:55 2012 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Thu Dec 6 11:51:20 2012 +0100

----------------------------------------------------------------------
 server/lib/cimi/models/base.rb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/882ceded/server/lib/cimi/models/base.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/base.rb b/server/lib/cimi/models/base.rb
index 2b13367..2988459 100644
--- a/server/lib/cimi/models/base.rb
+++ b/server/lib/cimi/models/base.rb
@@ -279,7 +279,8 @@ class CIMI::Model::Base < CIMI::Model::Resource
 
   def filter_attributes(attr_list)
     attrs = attr_list.inject({}) do |result, attr|
-      result[attr] = self.send(attr) if self.respond_to?(attr)
+      attr = attr.to_s.underscore
+      result[attr.to_sym] = self.send(attr) if self.respond_to?(attr)
       result
     end
     self.class.new(attrs)


Mime
View raw message