We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78a8555 commit a85c1d0Copy full SHA for a85c1d0
1 file changed
lib/jsonapi/resource_serializer.rb
@@ -171,9 +171,9 @@ def meta_hash(source)
171
end
172
173
def links_hash(source)
174
- {
175
- self: link_builder.self_link(source)
176
- }.merge(custom_links_hash(source)).compact
+ links = custom_links_hash(source)
+ links[:self] = link_builder.self_link(source) unless links.key?(:self)
+ links.compact
177
178
179
def custom_links_hash(source)
0 commit comments