lib/recurly/resource.rb in recurly-2.8.1 vs lib/recurly/resource.rb in recurly-2.8.2
- old
+ new
@@ -632,12 +632,15 @@
def reload(response = nil)
if response
return if response.body.to_s.length.zero?
fresh = self.class.from_response response
else
- fresh = self.class.find(
- @href || to_param, :etag => (etag unless changed?)
- )
+ options = {:etag => (etag unless changed?)}
+ fresh = if @href
+ self.class.from_response API.get(@href, {}, options)
+ else
+ self.class.find(to_param, options)
+ end
end
fresh and copy_from fresh
persist! true
self
rescue API::NotModified