We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b1d574 commit cbce78dCopy full SHA for cbce78d
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