rails/jbuilder — pull request #118 by bpartridge (2013-03-26 01:36:09+00:00)
Title: Allow nil values in set!

This very simple change, which [passes all existing tests](https://travis-ci.org/bpartridge/jbuilder/builds/5798329), allows you to pass optional relationships directly to `json.related_thing object.related_thing, :id, :name` without first checking if `object.related_thing.nil?`. If necessary, I'd be glad to write tests and documentation for this new functionality, but I'm just submitting this pull request to track the change.