From 3b9b4d728a82590b3034c000ce49412c36b14823 Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Sat, 26 Oct 2013 10:00:45 -0400 Subject: [PATCH] Update README to reflect override of json key in associations --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b8e9ff613..c35a70084 100644 --- a/README.md +++ b/README.md @@ -386,7 +386,7 @@ class PostSerializer < ActiveModel::Serializer attributes :id, :title, :body # look up comments, but use +my_comments+ as the key in JSON - has_many :comments, key: :my_comments + has_many :comments, root: :my_comments end ```