Skip to content

Instantly share code, notes, and snippets.

@shankardevy
Last active August 22, 2017 16:02
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 shankardevy/45b13cce106af3c5a8677eb66975c297 to your computer and use it in GitHub Desktop.
Save shankardevy/45b13cce106af3c5a8677eb66975c297 to your computer and use it in GitHub Desktop.
defmodule MangoWeb.CategoryController do
use MangoWeb, :controller
alias Mango.Catalog
def show(conn, _params) do
products = Catalog.list_products
conn
|> assign(:products, products)
|> assign(:name, "Title")
|> render("show.html")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment