# messengyr v0.0.1 Messengyr.Web.UserView

# Summary

## Functions

__phoenix_recompile__?()

Returns true whenever the list of templates changes in the filesystem

__resource__()

The resource name, as an atom, for this view

__templates__()

Returns the template root alongside all templates

render(template, assigns \\ %{})

Renders a user in JSON format

template_not_found(template, assigns)

Callback invoked when no template is found. By default it raises but can be customized to render a particular template

user_json(user)

# Functions

__phoenix_recompile__?()

Returns true whenever the list of templates changes in the filesystem.

__resource__()

The resource name, as an atom, for this view

__templates__()

Returns the template root alongside all templates.

render(template, assigns \\ %{})

Renders a user in JSON format.

## Example

    iex> alias Messengyr.Accounts.User
    iex> user = %User{
    ...>   id: 1,
    ...>   username: "test",
    ...>   email: "test@example.com"
    ...> }
    iex> Messengyr.Web.UserView.render("show.json", %{user: user})
    %{
      user: %{
        id: 1,
        username: "test",
      }
    }

template_not_found(template, assigns)

    template_not_found(Phoenix.Template.name, map) :: no_return

Callback invoked when no template is found. By default it raises but can be customized to render a particular template.

user_json(user)