Skip to content

Commit

Permalink
update request_lifecycle guide for changes in 1.7 (phoenixframework#5123
Browse files Browse the repository at this point in the history
)

* update request_lifecycle guide for changes 1.7

Prior to this commit the generated code has a mismatch with the guides
for the name of the route action. In 36639c3
this action from changed from `index` to `home`. This commit updates the
guides to match the new generated code.

* update guide assets for 1.7
  • Loading branch information
jeffweiss authored Nov 22, 2022
1 parent 4e57eee commit ef655aa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Binary file modified guides/assets/images/hello-from-phoenix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified guides/assets/images/hello-world-from-frank.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified guides/assets/images/welcome-to-phoenix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions guides/request_lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Phoenix generates a router file for us in new applications at `lib/hello_web/rou
The route for our "Welcome to Phoenix!" page from the previous [Up And Running Guide](up_and_running.html) looks like this.

```elixir
get "/", PageController, :index
get "/", PageController, :home
```

Let's digest what this route is telling us. Visiting [http://localhost:4000/](http://localhost:4000/) issues an HTTP `GET` request to the root path. All requests like this will be handled by the `index/2` function in the `HelloWeb.PageController` module defined in `lib/hello_web/controllers/page_controller.ex`.
Expand Down Expand Up @@ -58,7 +58,7 @@ defmodule HelloWeb.Router do
scope "/", HelloWeb do
pipe_through :browser

get "/", PageController, :index
get "/", PageController, :home
end

# Other scopes may use custom stacks.
Expand All @@ -78,7 +78,7 @@ Let's add a new route to the router that maps a `GET` request for `/hello` to th
scope "/", HelloWeb do
pipe_through :browser

get "/", PageController, :index
get "/", PageController, :home
get "/hello", HelloController, :index
end
```
Expand Down Expand Up @@ -237,7 +237,7 @@ For this exercise, we're going to reuse `HelloController` created at the [previo
scope "/", HelloWeb do
pipe_through :browser

get "/", PageController, :index
get "/", PageController, :home
get "/hello", HelloController, :index
get "/hello/:messenger", HelloController, :show
end
Expand Down

0 comments on commit ef655aa

Please sign in to comment.