lib/ivy/serializers/formats/json_api.rb in ivy-serializers-0.1.0 vs lib/ivy/serializers/formats/json_api.rb in ivy-serializers-0.2.0
- old
+ new
@@ -24,10 +24,14 @@
def links(document)
@hash_gen.store_object(:links) { super }
end
def primary_resource(primary_resource_name, primary_resource)
- @hash_gen.store_object(:data) { resource(primary_resource) }
+ super(:data, primary_resource)
+ end
+
+ def primary_resources(primary_resources_name, primary_resources)
+ super(:data, primary_resources)
end
def resource(resource)
super
type(:type, resource)