You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 1, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 1, 2026. It is now read-only.
Access user-facing data via non-admin routes on API #222
Architectural goal of this update is to decouple users and questionnaires.
Note that first/last names are being moved to the user model too. This way admins do not need to have questionnaires, and can still be considered a full "user".
Implementation notes for self:
Email fallback for full name when no questionnaire present is no longer needed
Moved first_name and last_name columns from questionnaire to user
Note the user<>questionnaire relationship is already set up (for example, questionnaire.email pulls directly from the user) so it doesn't seem like a new relationship has to be defined here. If you do need to create one I'd take a look at https://guides.rubyonrails.org/association_basics.html
@dquach217 Not yet; I'm still planning the changes out. Do you mean any changes in the models/tables? @sman591 Thanks! That should definitely make things easier. I think this change is mostly around exposing the user data itself to the API and treating that as the default rather than "less than" a questionnaire -- both in other controllers and in the model. So while the relationship might not change, its usage throughout the backend will.
Firstname/lastname refactor took literal months.
Plan is to test that refactor on staging before making API changes that will finally close out this issue
Activity
dquach217 commentedon May 23, 2020
@peterkos do you have er diagram of the changes?
sman591 commentedon May 23, 2020
Note the user<>questionnaire relationship is already set up (for example,
questionnaire.emailpulls directly from the user) so it doesn't seem like a new relationship has to be defined here. If you do need to create one I'd take a look at https://guides.rubyonrails.org/association_basics.htmlpeterkos commentedon May 23, 2020
@dquach217 Not yet; I'm still planning the changes out. Do you mean any changes in the models/tables?
@sman591 Thanks! That should definitely make things easier. I think this change is mostly around exposing the user data itself to the API and treating that as the default rather than "less than" a questionnaire -- both in other controllers and in the model. So while the relationship might not change, its usage throughout the backend will.
Adds Users & Staff support for #222
Adds #222 support to stats, fixes stats layout
refactor: `first_name` and `last_name` move from `questionnaire` to `…
peterkos commentedon Aug 30, 2020
Firstname/lastname refactor took literal months.
Plan is to test that refactor on staging before making API changes that will finally close out this issue
Squashed commit of the following:
Squashed commit of the following:
chore(release): 1.23.0 [skip ci]