Skip to content

Instantly share code, notes, and snippets.

@jeisenberg
Created September 8, 2016 03:38
Show Gist options
  • Save jeisenberg/0dabbe84a2f92532270f23799935664e to your computer and use it in GitHub Desktop.
Save jeisenberg/0dabbe84a2f92532270f23799935664e to your computer and use it in GitHub Desktop.
def edit(conn, %{"id" => _id, "type" => "image"}) do
conn
|> render("image.html", action: "/resource/#{conn.assigns.resource.id}", changeset: conn.assigns.resource)
end
def edit(conn, %{"id" => _id}) do
conn
|> render("edit.html", changeset: conn.assigns.resource)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment