Skip to content

Commit

Permalink
Document polymorphic_embed_inputs_for/1
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuprog committed May 27, 2024
1 parent a7d84b9 commit 634c9cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ You may use `polymorphic_embed_inputs_for/2` when working with LiveView.

Using this function, you have to render the necessary hidden inputs manually as shown above.

There is also `PolymorphicEmbed.HTML.Component.polymorphic_embed_inputs_for/1`, which functions similarly to [`Phoenix.Component.inputs_for/1`](Phoenix.Component.inputs_for).

### Get the type of a polymorphic embed

Sometimes you need to serialize the polymorphic embed and, once in the front-end, need to distinguish them.
Expand Down

0 comments on commit 634c9cf

Please sign in to comment.