-
Notifications
You must be signed in to change notification settings - Fork 7
Add mail_status enum to constrain possible values #1294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
16d6b4c
to
9bda198
Compare
9bda198
to
63c2e1f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice refactor. Left a suggestion that we can use the scopes that ActiveRecord provides for the enum, but not strictly necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 🙌
51de903
63c2e1f
to
51de903
Compare
Good spots @stephencdaly, not sure why I didn't do that in the first place 🤔 Have pushed those suggestions up now. |
We want to prevent mail_status from being set to any string, and to document in code the possible values of mail_status. This is done using an enum in the Submission model.
51de903
to
a772f88
Compare
|
What problem does this pull request solve?
We want to prevent
mail_status
from being set to any string, and to document in code the possible values ofmail_status
. This is done using an enum in theSubmission
model.Things to consider when reviewing