Permalink
Browse files

Merge pull request #156 from HashNuke/readme_sessions_fix

Fix session snippets in readme
  • Loading branch information...
2 parents c7aaad0 + 2336eac commit b70b1c6f5166bb712aa06cd318059f1120c4f91d @josevalim josevalim committed Nov 21, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 README.md
View
@@ -175,7 +175,7 @@ get "/users/:user_id" do
end
defp authenticate_user(conn) do
- unless conn.session[:user_id] do
+ unless get_session(conn, :user_id) do
halt! conn.status(401)
end
end
@@ -224,7 +224,7 @@ The connection plays a huge part when building Dynamos. As we have seen above, e
```elixir
defp authenticate_user(conn) do
- unless conn.session[:user_id] do
+ unless get_session(conn, :user_id) do
halt! conn.status(401)
end
end

0 comments on commit b70b1c6

Please sign in to comment.