-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(request): temperature en enum et pas en integer #90
Conversation
Quality Gate passedIssues Measures |
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.
LGTM
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.
👍
@@ -29,7 +29,7 @@ def destroy | |||
user = policy_scope(User).kept.find(params[:id]) | |||
authorize user | |||
|
|||
if current_user.discard | |||
if user.discard |
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.
ah, je vois que ma remarque sur la précédente PR a déjà été détecté et corrigé, bien joué :)
@@ -7,6 +7,11 @@ class Request < ApplicationRecord | |||
in: %i[pending accepted refused in_cancelation canceled completed], | |||
default: :pending | |||
|
|||
enumerize :temperature, | |||
in: %i[Chaud Froid Extérieur Autre], |
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.
en général, on va préférer que les enums soient en anglais et en minuscule dans le code, et avoir les clés de traductions dans côté front et éventuellement côté back (cf le fichier enumerize.fr.yml
)
in: %i[Chaud Froid Extérieur Autre], | |
in: %i[hot cold outside other], |
No description provided.