robstallion / programming-phoenix Goto Github PK
View Code? Open in Web Editor NEWWorking through the programming-phoenix book
Working through the programming-phoenix book
The following screenshot is from programming-phoenix1.4. They say to create the context file in the Accounts directory as shown below (screenshot from page 41)...
However, later on in the book (page 73), they tell you to run the following command...
$ mix phx.gen.context Accounts Credential credentials email:string:unique password_hash:string user_id:references:users
This command creates and updates files, similar to other phx.gen tasks. The problem though is that it creates the Accounts context outside of the Accounts folder. Here is the log from the terminal of when the above command is run...
* creating lib/rumbl/accounts/credential.ex
* creating priv/repo/migrations/20190318135255_create_credentials.exs
* creating lib/rumbl/accounts.ex <----------- THIS LINE
* injecting lib/rumbl/accounts.ex
* creating test/rumbl/accounts/accounts_test.exs
* injecting test/rumbl/accounts/accounts_test.exs
It creates a new accounts.ex file and when I navigate to this file in my text editor you can see that it is the same module...
This appears to either be an error in the book or that the book I have is not the latest version of phoenix.
I should easily be able to resolve this issue by removing the newly created file, moving my existing context to the rumbl folder and running the command again.
Opening this issue so I can look into whether or not this is an error in the book or something that I may have done incorrectly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.