From fa130ee3952a3ce217e12601214582e25ea02473 Mon Sep 17 00:00:00 2001 From: ewoutkleinsmann Date: Mon, 23 Dec 2013 18:04:34 +0100 Subject: [PATCH] Typo in the readme I didn't look it up in the source, but it appears that, as with attributes, 'key' should be used to change the JSON key and not 'root'. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fbac6525b..4d15a433e 100644 --- a/README.md +++ b/README.md @@ -390,7 +390,7 @@ class PostSerializer < ActiveModel::Serializer attributes :id, :title, :body # look up comments, but use +my_comments+ as the key in JSON - has_many :comments, root: :my_comments + has_many :comments, key: :my_comments end ```