From: Michal Fojtik <[email protected]>

Signed-off-by: Michal fojtik <[email protected]>
---
 server/lib/db/provider.rb | 11 +++++++++++
 1 file changed, 11 insertions(+)

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
-- 
1.8.0

Reply via email to