Created
October 20, 2016 21:35
-
-
Save bnhansn/3df538a270dd39522b60a00e08960ae9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 characters
| defmodule Sling.UserView do | |
| use Sling.Web, :view | |
| def render("user.json", %{user: user}) do | |
| %{ | |
| id: user.id, | |
| username: user.username, | |
| email: user.email, | |
| } | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment