From a160d6746f2f35e157b42cd6d797a74bed1405f0 Mon Sep 17 00:00:00 2001 From: Manoj M J Date: Thu, 15 Nov 2018 13:40:18 +0530 Subject: [PATCH] Fix Documentation of Meta Per Resource Some part of the documentation for this got removed during last merge, so fixing it. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 53c8bfa..77cbf3b 100644 --- a/README.md +++ b/README.md @@ -276,7 +276,12 @@ This will create a `self` reference for the relationship, and a `related` link f ### Meta Per Resource For every resource in the collection, you can include a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship. + + ```ruby +class MovieSerializer + include FastJsonapi::ObjectSerializer + meta do |movie| { years_since_release: Date.current.year - movie.year