Code Walkthrough
Let us begin with a bird-eye view of how the three entities comprising Notejam (i.e. users, notes and pads) relate to each other using the following ERD (the 'crow-feet' end if the 'many' end of the relationship)-
The relationships can be summarized in words as follows -
1. notes and users A user can have many notes but a note can belong to only one user
2. pads and users A user can have many pads but a pad can belong to only one user
3. notes and pads A pad can contain many notes but a note can only be within a single pad
Keep these relationships in mind as we now go through the templates and see how they are implemented.
We'll begin with the notes template.
Next: Notes