Skip to content
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

Merged
merged 11 commits into from
Dec 18, 2024

Conversation

Lelievre-david
Copy link
Contributor

No description provided.

Copy link
Contributor

@MisterOryon MisterOryon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Lelievre-david Lelievre-david merged commit 2c3352a into master Dec 18, 2024
6 checks passed
@Lelievre-david Lelievre-david deleted the feat/update-requests branch December 18, 2024 08:55
Copy link
Member

@Tao-Galasse Tao-Galasse left a 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
Copy link
Member

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],
Copy link
Member

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)

Suggested change
in: %i[Chaud Froid Extérieur Autre],
in: %i[hot cold outside other],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants