ActiveRecord::Base.include_root_in_json = true
doesn't seem to be working in rails 3.10.rc4 and I don't see it in the docs.
Since the root element is now off by default how do we re-enable it?
@comments.to_json
in rails 3.1 now looks like
[
{
comment: "Fun street park.",
created_at: 2011-06-29T02:28:29Z,
}
]
And in previous versions it has the root node which I need to get back.
[
{
comment: {
comment: "Fun street park.",
created_at: 2011-06-29T02:28:29Z
}
}
]