From 8c36f5dbde119ba24d72eb3f515d076c92f901e1 Mon Sep 17 00:00:00 2001 From: Max Pleaner Date: Thu, 26 Jan 2017 20:52:05 -0800 Subject: [PATCH] Fix syntax in post_login callback registration example The earlier syntax didn't work. It said that a function was expected and a tuple was given. Doing the fix shown here made it work. My deps for reference [{:phoenix, "~> 1.2.1"}, {:phoenix_pubsub, "~> 1.0"}, {:phoenix_ecto, "~> 3.0"}, {:postgrex, ">= 0.0.0"}, {:phoenix_html, "~> 2.6"}, {:phoenix_live_reload, "~> 1.0", only: :dev}, {:gettext, "~> 0.11"}, {:addict, "~> 0.3"}, {:guardian, "~> 0.14"}, {:mailgun, github: "chrismccord/mailgun", branch: "master", override: true}, {:cowboy, "~> 1.0"}] --- configs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs.md b/configs.md index 907e843..bb1e731 100644 --- a/configs.md +++ b/configs.md @@ -27,7 +27,7 @@ And add it to the configuration: config :addict, (...), - post_login: {MyApp.PostLoginAction, :log} + post_login: &(MyApp.PostLoginAction.log/3) ``` If you want to take different flows according to the success criteria of the action, you can pattern match the arguments: @@ -161,4 +161,4 @@ After the password reset email is sent, the reset token will expire in 1 day (86 config :addict, (...), password_reset_token_time_to_expiry: 120 -``` \ No newline at end of file +```