From 6486858511a750a5974ad29e9e4cb4fbee522a89 Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Wed, 25 Jan 2023 17:51:03 -0500 Subject: [PATCH] docs: don't show readme on ash_hq (#160) * docs: don't show readme on ash_hq * docs: show phoenix 1.7 compatibility note and add ash_apis config --- .../tutorials/getting-started-with-authentication.md | 7 +++++++ .../integrating-ash-authentication-and-phoenix.md | 5 +++++ mix.exs | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/documentation/tutorials/getting-started-with-authentication.md b/documentation/tutorials/getting-started-with-authentication.md index c838b3b..4f56cf0 100644 --- a/documentation/tutorials/getting-started-with-authentication.md +++ b/documentation/tutorials/getting-started-with-authentication.md @@ -106,6 +106,13 @@ defmodule MyApp.Accounts do end ``` +Be sure to add it to the `ash_apis` config in your `config.exs` + +```elixir +# in config/config.exs +config :my_app, :ash_apis, [..., MyApp.Accounts] +``` + Next, let's define our registry: ```elixir diff --git a/documentation/tutorials/integrating-ash-authentication-and-phoenix.md b/documentation/tutorials/integrating-ash-authentication-and-phoenix.md index 65a2d2b..59f5a69 100644 --- a/documentation/tutorials/integrating-ash-authentication-and-phoenix.md +++ b/documentation/tutorials/integrating-ash-authentication-and-phoenix.md @@ -39,6 +39,11 @@ Add `ash_authentication_phoenix` to your `.formatter.exs`: ] ``` +## Phoenix 1.7 compatibility + +In `your_app_web.ex` you will need to change `helpers: false` to `helpers: true` in the router section. AshAuthenticationPhoenix relies on +these helpers to know where your authenticated routes are. + ## `AshAuthentication.Phoenix.Router` `ash_authentication_phoenix` includes several helper macros which can generate diff --git a/mix.exs b/mix.exs index 9c847da..1fcc9b9 100644 --- a/mix.exs +++ b/mix.exs @@ -83,7 +83,7 @@ defmodule AshAuthentication.MixProject do Path.wildcard("documentation/**/*.md")) |> Enum.map(fn "README.md" -> - {:"README.md", title: "Read Me"} + {:"README.md", title: "Read Me", ash_hq?: false} "documentation/tutorials/" <> _ = path -> {String.to_atom(path), []}