We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 28d062f + cbce78d commit 539051bCopy full SHA for 539051b
1 file changed
lib/jsonapi/resource_serializer.rb
@@ -230,9 +230,9 @@ def meta_hash(source)
230
end
231
232
def links_hash(source)
233
- {
234
- self: link_builder.self_link(source)
235
- }.merge(custom_links_hash(source)).compact
+ links = custom_links_hash(source)
+ links[:self] = link_builder.self_link(source) unless links.key?(:self)
+ links.compact
236
237
238
def custom_links_hash(source)
0 commit comments