mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
adds polymorphic option to association definition which includes association type in serializer
regen gemlock regen gemlock better variable naming rubocop fixes adds to changelog adds empty relationship and has_many polymorph tests indent test cleaning -rubocop rubocop rubocop rubocop changelog remove silly .DS fix roque failure fix
This commit is contained in:
@@ -52,6 +52,7 @@ Where:
|
||||
- `if:`
|
||||
- `unless:`
|
||||
- `virtual_value:`
|
||||
- `polymorphic:` defines if polymorphic relation type should be nested in serialized association.
|
||||
- optional: `&block` is a context that returns the association's attributes.
|
||||
- prevents `association_name` method from being called.
|
||||
- return value of block is used as the association value.
|
||||
|
||||
Reference in New Issue
Block a user