Closed JohnRDOrazio closed 3 years ago
In the WeddingPartyMembers
model, should we define partyMemberRole
as an enum also? With a predefined set of roles such as Father
, Mother
, Parent
, Grandparent
, Grandfather
, Grandmother
, Brother
, Sister
, Friend
, Aunt
, Uncle
etc. ? Or would that be better left as a string, for greater freedom, simply offering some of these suggestions in the UI?
I figured we could have two fields at this point, partyMemberRole
and partyMemberRelationship
. The first would be one of the above mentioned roles, the second would offer a list of suggestions such as of the Bride
, of the Groom
, of the Bride and the Groom
, of the Family of the Bride
, of the Family of the Groom
.
User and WeddingPartyMember models have been generated in the new git history
With PR #24, the Projects models, controllers and views were generated.
Now we need to integrate the Users model and the WeddingPartyMembers model.
Keeping in mind @mftruso 's observations on the
hasMany
model, do we only need to generate the models? Or do we also need controllers and views?I don't think we need a separate view for the WeddingPartyMembers, I believe we can just integrate into the Projects view, since the WeddingPartyMembers only exist in a Project. However we will need to take care of them being inserted into the database upon creating a new project or updating an existing project (how? where is the logic that takes care of the form posting? Is that in a controller?). Or perhaps the scaffold generator is useful anyways, seeing it also generates functional tests? Then we could just simply not use the routes or views that we don't need?
In any case a view for the Users model might come in handy, so we can have a separate area where a user can create or update their password, edit / verify their email, etc. So perhaps we should use the scaffold generator in this case?
This is what I have so far for the models we've been discussing:
This first scaffold of the three is already taken care of. For the next two, I believe that
project:references
should take care of thehasMany
relationship? Or does another step need to be taken?@mftruso you might have a better grasp on how to handle the next steps, following PR #24?