Phoenix.View.render_one/4

Parsed documentation:
View on GitHub
Renders a single item if not nil.

The following:

    render_one user, UserView, "show.html"

is roughly equivalent to:

    if user != nil do
      render(UserView, "show.html", user: user)
    end

The underlying user is passed to the view and template as
`:user`, which is inflected from the view name. The name
of the key in assigns can be customized with the `:as` option:

    render_one user, UserView, "show.html", as: :data

is roughly equivalent to:

    if user != nil do
      render(UserView, "show.html", data: user)
    end
Suggestions:
Please help! Open an issue on GitHub if this assessment is incorrect.