Skip to content

Commit

Permalink
Update README to Avoid Elixir Warning (#762)
Browse files Browse the repository at this point in the history
A warning is issued for use of `get_env/2` used outside of a module.
The warning suggests using `compile_env/3` instead.

This change updates the documentation to conform to this suggestion
and remove the warning, resulting in a cleaner and more modern
setup for `wallaby`.

Resolves [#761](#761)
  • Loading branch information
stratigos authored Mar 26, 2024
1 parent cab3b1f commit 0c25c04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ It's important that this is at the top of `endpoint.ex` before any other plugs.
defmodule YourAppWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :your_app

if sandbox = Application.get_env(:your_app, :sandbox) do
if sandbox = Application.compile_env(:your_app, :sandbox, false) do
plug Phoenix.Ecto.SQL.Sandbox, sandbox: sandbox
end

Expand Down

0 comments on commit 0c25c04

Please sign in to comment.