Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Bug fix and improvement to handling of :relationships in to_json method #22

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

BinaryPaean
Copy link

Currently no check for nil option hash with :relationships opt in to_json, so something like:
cow.to_json({:relationships => {:baby_cows => {}}}) is required.
Null check and test added, along with collection of string/symbol arguments to make
cow.to_json(:relationships => :baby_cows) possible, along with cow.to_json(:relationships => [:baby_cows])

@BinaryPaean
Copy link
Author

Commits are fix,test,fix,test sequence for convenience. First pair just allow for a null opts in the chained call. Second pair allow for symbol or string arguments.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant