Jbuilder standalone will not render anything. Do I need a configuration parameter to get it to work in Rails 3.2.8?
1.9.2p320 :257 > Jbuilder
=> Jbuilder
1.9.2p320 :258 > Jbuilder.new {|json| json.foo 'bar'}.target!
=> "{}"
Thanks a million.
UPDATE
The encode method works.
1.9.2p320 :016 > Jbuilder.encode {|json| json.foo 'bar'}
=> "{\"Foo\":\"bar\"}"
But I'd like to use nested Jbuilder objects to construct more complex JSON. The documentation says I should be able to get back a builder object and call target! to get the json string. I'm really quite stumped.