messengyr v0.0.1 Messengyr.Web.UserView
Summary
Functions
Returns true whenever the list of templates changes in the filesystem
The resource name, as an atom, for this view
Returns the template root alongside all templates
Renders a user in JSON format
Callback invoked when no template is found. By default it raises but can be customized to render a particular template
Functions
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",
}
}
Callback invoked when no template is found. By default it raises but can be customized to render a particular template.