jsmestad / jsonapi-consumer

Client framework for consuming JSONAPI services in Ruby
https://github.com/jsmestad/jsonapi-consumer
Apache License 2.0
94 stars 18 forks source link

Ignore `links` payload for new objects if empty #9

Closed jsmestad closed 9 years ago

jsmestad commented 9 years ago

Prior to this every new object would send a bad payload of {...., links: {}}. This fixes this to either include the proper association keys when populated {...., links: {posts: [1,2,3]}} or just exclude the value all together {....}