From ca3e2b2432e7ddf16e0ae0c6a79830d3267adffa Mon Sep 17 00:00:00 2001 From: geemus Date: Tue, 15 Feb 2011 11:27:31 -0800 Subject: [PATCH] require json for to_json of collection/model --- lib/fog/core/collection.rb | 1 + lib/fog/core/model.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/fog/core/collection.rb b/lib/fog/core/collection.rb index 9f3658cf0..640648224 100644 --- a/lib/fog/core/collection.rb +++ b/lib/fog/core/collection.rb @@ -113,6 +113,7 @@ module Fog end def to_json + require 'json' self.map {|member| member.attributes}.to_json end diff --git a/lib/fog/core/model.rb b/lib/fog/core/model.rb index bc3213de8..c1bfb441e 100644 --- a/lib/fog/core/model.rb +++ b/lib/fog/core/model.rb @@ -33,6 +33,7 @@ module Fog end def to_json + require 'json' attributes.to_json end