I wanted to have a look at phoenix
1.3-dev. I clone phoenix from repository and followed the
phoenix/installer/README.md to build archive.
phoenix/installer/README.md (for reference)
$ cd installer $ MIX_ENV=prod mix archive.build $ mix archive.install
I created a new phoenix app by
mix phx.new blog but when i tried to create a simple html scaffold by
mix phx.gen.html Post posts title body:text then i get following error message.
** (Mix) Expected the schema argument, “:“Elixir.Company.companies””, to be a valid module name
mix phx.gen.html and mix phx.gen.json expect a context module name,
followed by singular and plural names of the generated resource, ending
with any number of attributes:
mix phx.gen.html Accounts User users name:string mix phx.gen.json Accounts User users name:string
The Accounts context serves as the API boundary for the given resource.
Multiple resources may belong to a context and a resource may be
split over distinct contexts (such as Accounts.User and Blog.User).
==== error msg ends ====
My question is why we should add a
context module? how and where it helps?
if you know something about this, please describe a usecase so i can understand.