View Source Doumi.Phoenix.Params (doumi_phoenix_params v0.3.3)

Link to this section Summary

Functions

Converts params to form.

Converts form or changeset to map(map with atom keys).

Converts form or changeset to params(map with string keys).

Link to this section Functions

Link to this function

to_form(struct, params, opts \\ [])

View Source
@spec to_form(
  struct :: %{:__struct__ => atom(), optional(binary()) => any()},
  params :: map(),
  opts :: keyword()
) :: form :: Phoenix.HTML.Form.t()

Converts params to form.

@spec to_map(form_or_changeset :: Phoenix.HTML.Form.t() | Ecto.Changeset.t()) ::
  map :: map()

Converts form or changeset to map(map with atom keys).

Link to this function

to_params(form_or_changeset, more_params \\ %{})

View Source
@spec to_params(
  form_or_changeset :: Phoenix.HTML.Form.t() | Ecto.Changeset.t(),
  more_params :: map()
) :: params :: map()

Converts form or changeset to params(map with string keys).