lib/yaks/mapper/association_mapper.rb in yaks-0.6.2 vs lib/yaks/mapper/association_mapper.rb in yaks-0.7.0
- old
+ new
@@ -32,11 +32,11 @@
# this is actually needed and can be tested.
end
def add_subresource(resource)
object = parent_mapper.load_association(association.name)
- subresource = association.map_resource(object, context)
- resource.add_subresource(rel, subresource)
+ subresource = association.map_resource(object, context).add_rel(rel)
+ resource.add_subresource(subresource)
end
end
end
end