AE
Ash Elixir•3y ago
cro

Getting Started with Ash and Phoenix Blog question

In the ash_phoenix tutorial where it talks about creating the Registry, shouldn't

entry MyAshPhoenixApp.Blog.Post

entry MyAshPhoenixApp.Blog.Post
be

entry MyAshPhoenixApp.Blog.Resources.Post

entry MyAshPhoenixApp.Blog.Resources.Post
? And then a little further down the page it says that it's convention to place resources in the resources directory, but the filenames and defmodule statements below still have post.ex in the blog/ directory.
1 Reply
ZachDaniel
ZachDaniel•3y ago
The second part of your question is perhaps an oversight in the tutorial actually, it may have already been fixed but not deployed As for module names: You are free to name your resources however you like, and it is true that a general convention in Elixir is naming the module name after its directly. I personally don't do it in all cases, and for specific framework structures don't worry about it. In this instance, I put my resources in api/resources/... but leave it out of the module name. But if you prefer MyAshPhoenixApp.Blog.Resources.Post, feel free to use that convention 🙂

Did you find this page helpful?