From e4aa6bd244a40e6214409e19c78468b098419f1a Mon Sep 17 00:00:00 2001 From: geemus Date: Tue, 27 Apr 2010 16:34:04 -0700 Subject: [PATCH] reload on a new_record? just returns self --- lib/fog/model.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/fog/model.rb b/lib/fog/model.rb index f280fcddf..bcae38065 100644 --- a/lib/fog/model.rb +++ b/lib/fog/model.rb @@ -84,8 +84,11 @@ module Fog end def reload - new_attributes = collection.get(identity).attributes - merge_attributes(new_attributes) + if data = collection.get(identity) + new_attributes = data.attributes + merge_attributes(new_attributes) + end + self end def requires(*args)