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 ```