Skip to content

Commit

Permalink
Change example filename to fit the scenario ✅ (#5703)
Browse files Browse the repository at this point in the history
  • Loading branch information
De Wet Blomerus committed Jan 25, 2024
1 parent 96387d2 commit 465633d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/json_and_apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ To understand how to render JSON, let's start with the `index` action from `UrlC

As we can see, this is not any different from how Phoenix renders HTML templates. We call `render/3`, passing the connection, the template we want our views to render (`:index`), and the data we want to make available to our views.

Phoenix typically uses one view per rendering format. When rendering HTML, we would use `HelloHTML`. Now that we are rendering JSON, we will find a `UrlJSON` view collocated with the template at `lib/hello_web/controllers/url_json.ex`. Let's open it up:
Phoenix typically uses one view per rendering format. When rendering HTML, we would use `UrlHTML`. Now that we are rendering JSON, we will find a `UrlJSON` view collocated with the template at `lib/hello_web/controllers/url_json.ex`. Let's open it up:

```elixir
defmodule HelloWeb.UrlJSON do
Expand Down

0 comments on commit 465633d

Please sign in to comment.