Created
July 10, 2015 19:58
-
-
Save justgage/f428a0fc1043fe68b165 to your computer and use it in GitHub Desktop.
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 characters
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