lib/dato/json_api_deserializer.rb in dato-0.3.31 vs lib/dato/json_api_deserializer.rb in dato-0.4.0.pre

- old
+ new

@@ -11,10 +11,13 @@ end end def deserialize_resource(data) result = { id: data[:id] } - result.merge!(data[:attributes]) + + if data[:attributes] + result.merge!(data[:attributes]) + end relationships = data.delete(:relationships) if relationships relationships.each do |key, handle|