Skip to content

Instantly share code, notes, and snippets.

@justgage
Created July 10, 2015 19:58
Show Gist options
  • Save justgage/f428a0fc1043fe68b165 to your computer and use it in GitHub Desktop.
Save justgage/f428a0fc1043fe68b165 to your computer and use it in GitHub Desktop.
def index(conn, _params) do
user = Plug.Conn.get_session(conn, :current_user)
token = Plug.Conn.get_session(conn, :access_token)
vans = Repo.all(Van)
# how to get today :P
{date, _} = :calendar.local_time
date = Ecto.Date.from_erl date
render(conn, "index.html", user: user, vans: vans, token: token, date: date)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment