/category_controller.ex Secret
Last active
August 22, 2017 16:02
Revisions
-
shankardevy revised this gist
Aug 22, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ defmodule MangoWeb.CategoryController do use MangoWeb, :controller alias Mango.Catalog def show(conn, _params) do -
shankardevy created this gist
Jul 14, 2017 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ defmodule Mango.Web.CategoryController do use Mango.Web, :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