prevent quoted nulls ("null") when to_json is called on nil relationship #23

wants to merge 1 commit into


None yet
1 participant

soopa commented Oct 21, 2011

Fixes the case where calling something like:

resource.to_json(:relationships => { :nested_resource => { :only => [:id] } })

When the nested resource returns nil, would return invalid JSON like…


Rather than valid JSON like…


(Note the quotes around null)

soopa commented Nov 7, 2011


soopa commented Sep 25, 2013

Checking in, 2 years later. I've just rebased this cleanly on latest master and the build is passing.

@solnic @dkubb could one of your merge this please? I'd love to get the reference to my fork out of my Gemfile and resolve this issue for anyone else who may be stumbling upon it.


soopa commented Sep 25, 2013

Updated branch target in #41, closing this one.

@soopa soopa closed this Sep 25, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment