Skip to content

Instantly share code, notes, and snippets.

@bnhansn
Created October 20, 2016 21:35
Show Gist options
  • Save bnhansn/3df538a270dd39522b60a00e08960ae9 to your computer and use it in GitHub Desktop.
Save bnhansn/3df538a270dd39522b60a00e08960ae9 to your computer and use it in GitHub Desktop.
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