From 8c29719cff674ff084ef09983f149e4e7c359e3d Mon Sep 17 00:00:00 2001 From: An Duong Date: Wed, 25 Nov 2015 22:13:43 +0700 Subject: [PATCH] - Update Readme.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit + Add ‘Alias Attribute’ anchor link to reference backward from version 0.10.x --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9c7fd6fd..366e5c30 100644 --- a/README.md +++ b/README.md @@ -339,6 +339,7 @@ And it's also safe to mutate keys argument by doing keys.delete(:author) in case you want to avoid creating two extra arrays. Note that if you do an in-place modification, you still need to return the modified array. +### Alias Attribute If you would like the key in the outputted JSON to be different from its name in ActiveRecord, you can declare the attribute with the different name and redefine that method: