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

Some more small fixes #1283

Merged
merged 5 commits into from
Dec 19, 2024
Merged

Some more small fixes #1283

merged 5 commits into from
Dec 19, 2024

Conversation

kasugaijin
Copy link
Collaborator

🔗 Issue

Fixes bugs found by @mgrigoriev8109 here

✍️ Description

📷 Screenshots/Demos

@kasugaijin kasugaijin requested a review from jmilljr24 December 19, 2024 20:35
Copy link
Collaborator

@jmilljr24 jmilljr24 left a comment

Choose a reason for hiding this comment

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

@kasugaijin Looks good. Just one thought.

@@ -26,7 +26,7 @@
</div>
<div class="form-group">
<%= f.label :sex_eq, "Sex" %>
<%= f.select :sex_eq, ["Male", "Female"], {include_blank: 'All'}, class: "form-select" %>
<%= f.select :sex_eq, [["Male", "male"], ["Female", "female"]], {include_blank: 'All'}, class: "form-select" %>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is fine for now. The create pet form just gives a drop down so we really should only have downcase. I'm guessing the issue stemmed from seed data. We could a maybe add a before_save to the model.

Copy link
Collaborator Author

@kasugaijin kasugaijin Dec 19, 2024

Choose a reason for hiding this comment

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

The pet create form will save a downcase sex, but the ransack filter was using capitalized sex. I think a better approach would be to just use an enum instead of a string for the sex attribute. That should get rid of the case issue for good. I'll add a to do in the project for this.

@kasugaijin kasugaijin merged commit cfc15a4 into main Dec 19, 2024
5 checks passed
@kasugaijin kasugaijin deleted the more-fixes branch December 19, 2024 22:06
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.

2 participants