Changeset View
Changeset View
Standalone View
Standalone View
lib/kolab_chat/web/views/error_view.ex
- This file was moved from web/views/error_view.ex.
defmodule KolabChat.ErrorView do | defmodule KolabChat.Web.ErrorView do | ||||
use KolabChat.Web, :view | use KolabChat.Web, :view | ||||
def render("404.html", _assigns) do | def render("404.html", _assigns) do | ||||
"Page not found" | "Page not found" | ||||
end | end | ||||
def render("500.html", _assigns) do | def render("500.html", _assigns) do | ||||
"Internal server error" | "Internal server error" | ||||
end | end | ||||
# In case no render clause matches or no | # In case no render clause matches or no | ||||
# template is found, let's render it as 500 | # template is found, let's render it as 500 | ||||
def template_not_found(_template, assigns) do | def template_not_found(_template, assigns) do | ||||
render "500.html", assigns | render "500.html", assigns | ||||
end | end | ||||
end | end |