Skip to content

Instantly share code, notes, and snippets.

@wdiechmann
Created February 23, 2016 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wdiechmann/0da1a6d38df3c313ff45 to your computer and use it in GitHub Desktop.
Save wdiechmann/0da1a6d38df3c313ff45 to your computer and use it in GitHub Desktop.
elixir abstractcontroller
# web/controllers/page_controller.ex
defmodule HelloPhoenix.PageController do
# use HelloPhoenix.Web, :controller
use AbstractController
# def index(conn, _params) do
# render conn, "index.html"
# end
def show(conn, _params) do
render conn, "show.html"
end
end
#lib/abstract_controller.ex
defmodule AbstractController do
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment