philomena/lib/philomena_web/controllers/page_controller.ex

12 lines
284 B
Elixir
Raw Normal View History

2019-08-15 02:32:32 +02:00
defmodule PhilomenaWeb.PageController do
use PhilomenaWeb, :controller
2019-11-29 07:35:15 +01:00
alias Philomena.StaticPages.StaticPage
plug :load_resource, model: StaticPage, id_field: "slug"
def show(conn, _params) do
render(conn, "show.html", static_page: conn.assigns.static_page)
2019-08-15 02:32:32 +02:00
end
end