Skip to content

Commit

Permalink
Clarify scope/3 and scope/4 usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Nezteb authored Aug 23, 2023
1 parent 05ac0ae commit 241122b
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 @@ -262,7 +262,7 @@ scope "/api" do
end
```

Note that the above snippet uses [`scope/3`](https://hexdocs.pm/phoenix/Phoenix.Router.html#scope/3); some Phoenix projects will instead use [`scope/4`](https://hexdocs.pm/phoenix/Phoenix.Router.html#scope/3), which adds an alias to all modules declared in the scope:
Note that the above snippet uses [`scope/3`](https://hexdocs.pm/phoenix/Phoenix.Router.html#scope/3). Some Phoenix projects will instead use [`scope/4`](https://hexdocs.pm/phoenix/Phoenix.Router.html#scope/4) which adds an alias to all modules declared in the scope, as shown below:
```elixir
scope "/api", MyAppWeb do
pipe_through :api
Expand Down

0 comments on commit 241122b

Please sign in to comment.