Skip to content

Commit

Permalink
Document option to set custom type field
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuprog committed Dec 25, 2020
1 parent 7488273 commit 5b95981
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ field :contexts, {:array, PolymorphicEmbed},
### Options

* `:types` - discussed above.
* `:type_field` - specify a custom type field. Defaults to `:__type__`.
* `:on_type_not_found` - specify whether to raise or add a changeset error if the embed's type cannot be inferred.
Possible values are `:raise` and `:changeset_error`. By default, a changeset error "is invalid" is added.
* `:on_replace` - mandatory option that can only be set to `:update` for a single embed and `:delete` for a list of
Expand Down

0 comments on commit 5b95981

Please sign in to comment.