You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2012/12/06 11:51:56 UTC
[1/3] git commit: CIMI: Fix $select filter to undercore attributes
(DTACLOUD-391)
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 <mf...@redhat.com>
Authored: Wed Dec 5 17:59:55 2012 +0100
Committer: Michal fojtik <mf...@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)