lib/codat/models/integration.rb in codat-0.1.5 vs lib/codat/models/integration.rb in codat-0.1.6
- old
+ new
@@ -12,10 +12,10 @@
def self.all(params = {})
result = get(ENDPOINT, params)
return [] unless successful_response?(result)
- result.body.map { |integration| new(json: integration) }
+ result.body.fetch(:results, []).map { |integration| new(json: integration) }
end
end
end
end