Understanding Forms and Changesets: Difference between revisions

From ElixirBlocks
Jump to: navigation, search
No edit summary
No edit summary
Line 3: Line 3:


In this tutorial you create a database table named Item and its Ecto "Context" data. You learn how changesets work by writing controllers, template and forms.
In this tutorial you create a database table named Item and its Ecto "Context" data. You learn how changesets work by writing controllers, template and forms.
To begin, create a new empty Phoenix app named app.
When complete, run this command to create database tables and Ecto context code.
<source>
mix phx.gen.context Items Item items name:string
</source>

Revision as of 11:37, 13 October 2023

This page is in progress


In this tutorial you create a database table named Item and its Ecto "Context" data. You learn how changesets work by writing controllers, template and forms.

To begin, create a new empty Phoenix app named app.


When complete, run this command to create database tables and Ecto context code.



mix phx.gen.context Items Item items name:string