lib/recurly/resource.rb in recurly-2.11.2 vs lib/recurly/resource.rb in recurly-2.11.3
- old
+ new
@@ -631,12 +631,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