vt-elixir / ja_serializer

JSONAPI.org Serialization in Elixir.
Other
640 stars 148 forks source link

Consistent relation override #299

Closed lasseebert closed 5 years ago

lasseebert commented 5 years ago

Closes #298

For attributes it is possible to override function with either one or two arguments: (model) or (model, conn). For relations, only the (model, conn) override is possible. This is inconsistent and might confuse.

This PR adds the (model) override to relations too.

beerlington commented 5 years ago

Thanks!

lasseebert commented 5 years ago

Thanks for the quick review and merge :)