Skip to content

Commit 1e4eaa1

Browse files
committed
Merge pull request #1345 from anduong/update_document_for_attribute_method_in_09x_version
Update alias attribute in Readme.md of 0.9.x version
2 parents dc08f0e + 8c29719 commit 1e4eaa1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ And it's also safe to mutate keys argument by doing keys.delete(:author)
339339
in case you want to avoid creating two extra arrays. Note that if you do an
340340
in-place modification, you still need to return the modified array.
341341

342+
### Alias Attribute
342343
If you would like the key in the outputted JSON to be different from its name
343344
in ActiveRecord, you can declare the attribute with the different name
344345
and redefine that method:

0 commit comments

Comments
 (0)