Skip to content

Instantly share code, notes, and snippets.

@shankardevy

shankardevy/category_controller.ex Secret

Last active Aug 22, 2017
Embed
What would you like to do?
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