README.md in mutils-1.1.8 vs README.md in mutils-1.2.0
- old
+ new
@@ -72,9 +72,11 @@
# User Serializer
class UserSerializer < Mutils::Serialization::BaseSerializer
attributes :id, :first_name, :last_name, :email
## OR
attribute :email, {always_include: true} ## this will allow to selectively include email
+ ## OR
+ attribute :email, &:email ## this will call email attribute from User
end
```
### Relations
Relations such as `has_many`, `belongs_to`, `has_one` can be used as follows
1. Every relation must be provided with their own serializer