Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuprog authored May 27, 2024
1 parent 0cdcdd0 commit 94a8ed2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ polymorphic_embeds_many :contexts,
age: MyApp.Context.Age,
device: MyApp.Context.Device
],
on_replace: :delete,
on_type_not_found: :raise,
on_replace: :delete
nilify_unlisted_types_on_load: [:deprecated_type]
```

#### Options
Expand All @@ -173,7 +174,7 @@ polymorphic_embeds_many :contexts,
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
embeds (we force a value as the default value of this option for `embeds_one` and `embeds_many` is `:raise`).
* `:retain_unlisted_types_on_load`: allow the following unconfigured types to be loaded without raising an error. Useful for handling deprecated structs still present in the database.
* `:retain_unlisted_types_on_load`: allow unconfigured types to be loaded without raising an error. Useful for handling deprecated structs still present in the database.
* `:nilify_unlisted_types_on_load`: same as `:retain_unlisted_types_on_load`, but nilify the struct on load.

### Displaying form inputs and errors in Phoenix templates
Expand Down

0 comments on commit 94a8ed2

Please sign in to comment.