mirror of
https://github.com/ash-project/ash_phoenix.git
synced 2024-09-20 07:12:49 +12:00
docs: change getting started directory structure to match realworld (#78)
This commit is contained in:
parent
3caecf30de
commit
022e3a3c0a
1 changed files with 3 additions and 3 deletions
|
@ -138,7 +138,7 @@ An Ash registry points to one or more resources. In our case we will only have a
|
||||||
For now take a look at the `Blog` API and the `Blog.Registry`:
|
For now take a look at the `Blog` API and the `Blog.Registry`:
|
||||||
|
|
||||||
```elixir
|
```elixir
|
||||||
# lib/my_ash_phoenix_app/blog.ex
|
# lib/my_ash_phoenix_app/blog/blog.ex
|
||||||
|
|
||||||
defmodule MyAshPhoenixApp.Blog do
|
defmodule MyAshPhoenixApp.Blog do
|
||||||
use Ash.Api
|
use Ash.Api
|
||||||
|
@ -177,16 +177,16 @@ It's convention to place all the resource in their own resources folder. So when
|
||||||
lib/
|
lib/
|
||||||
├─ my_ash_phoenix_app/
|
├─ my_ash_phoenix_app/
|
||||||
│ ├─ blog/
|
│ ├─ blog/
|
||||||
|
│ │ ├─ blog.ex
|
||||||
│ │ ├─ registry.ex
|
│ │ ├─ registry.ex
|
||||||
│ │ ├─ resources/
|
│ │ ├─ resources/
|
||||||
│ │ │ ├─ post.ex
|
│ │ │ ├─ post.ex
|
||||||
│ ├─ blog.ex
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Below is the resource module. Read the comments carefully, every line is explained:
|
Below is the resource module. Read the comments carefully, every line is explained:
|
||||||
|
|
||||||
```elixir
|
```elixir
|
||||||
# lib/my_ash_phoenix_app/blog/post.ex
|
# lib/my_ash_phoenix_app/blog/resources/post.ex
|
||||||
|
|
||||||
defmodule MyAshPhoenixApp.Blog.Post do
|
defmodule MyAshPhoenixApp.Blog.Post do
|
||||||
# Using Ash.Resource turns this module into an Ash resource.
|
# Using Ash.Resource turns this module into an Ash resource.
|
||||||
|
|
Loading…
Reference in a new issue