deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [1/2] git commit: CIMI: Fix strange issue with Fedora MRI and Datamapper associations
Date Fri, 30 Nov 2012 16:10:39 GMT
Updated Branches:
  refs/heads/master 9c07013fe -> d9e21e027


CIMI: Fix strange issue with Fedora MRI and Datamapper associations


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

Branch: refs/heads/master
Commit: d9e21e027c47dfd062cf97d1a2746d820a95d404
Parents: 321de1a
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Fri Nov 30 17:04:08 2012 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Fri Nov 30 17:04:08 2012 +0100

----------------------------------------------------------------------
 server/lib/db/provider.rb |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d9e21e02/server/lib/db/provider.rb
----------------------------------------------------------------------
diff --git a/server/lib/db/provider.rb b/server/lib/db/provider.rb
index 54fe2d7..25e2ca9 100644
--- a/server/lib/db/provider.rb
+++ b/server/lib/db/provider.rb
@@ -10,6 +10,17 @@ module Deltacloud
 
       has n, :entities
       has n, :machine_templates
+
+      # This is a workaround for strange bug in Fedora MRI:
+      #
+      def machine_templates
+        MachineTemplate.all(:provider_id => self.id)
+      end
+
+      def entities
+        Entity.all(:provider_id => self.id)
+      end
+
     end
 
   end


Mime
View raw message