EpochtalkServerWeb.NotificationView (epochtalk_server v0.1.0)
Renders and formats User
data, in JSON format for frontend
Link to this section Summary
Functions
The resource name, as an atom, for this view
Renders the given template locally.
Renders whatever data it is passed when template not found. Data pass through for rendering misc responses (ex: {found: true} or {success: true})
Link to this section Functions
Link to this function
__resource__()
The resource name, as an atom, for this view
Link to this function
render(template, assigns \\ %{})
Renders the given template locally.
Link to this function
template_not_found(template, assigns)
@spec template_not_found(Phoenix.Template.name(), map()) :: no_return()
Renders whatever data it is passed when template not found. Data pass through for rendering misc responses (ex: {found: true} or {success: true})
example
Example
iex> EpochtalkServerWeb.NotificationView.render("DoesNotExist.json", data: %{anything: "abc"})
%{anything: "abc"}
iex> EpochtalkServerWeb.NotificationView.render("DoesNotExist.json", data: %{success: true})
%{success: true}