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

switch model enums to use positional arguments #3315

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

colinxfleming
Copy link
Member

I rule and have completed some work on Case Manager that's ready for review!

Looks like the approach of enums is changing in rails 8 to a positional style. Sure, why not. This adjusts the approach to use that positional style.

This pull request makes the following changes:

  • Adjusts enums to use a positional style instead of a keyword style

no view changes, but here's a proveit to confirm I got everything -- relying on the tests for the rest of it

colin@Colins-Air-2 dcaf_case_management % git grep "enum" | grep "\.rb"                                  
app/models/archived_patient.rb:  enum :age_range, {
app/models/call.rb:  enum :status, {
app/models/config.rb:  enum :config_key, {
app/models/event.rb:  enum :event_type, {
app/models/user.rb:  enum :role, {

It relates to the following issue #s:

For reviewer:

  • Adjust the title to explain what it does for the notification email to the listserv.
  • Tag this PR:
    • feature if it contains a feature, fix, or similar. This is anything that contains a user-facing fix in some way, such as frontend changes, alterations to backend behavior, or bug fixes.
    • dependencies if it contains library upgrades or similar. This is anything that upgrades any dependency, such as a Gemfile update or npm package upgrade.
  • If it contains neither, no need to tag this PR.

@colinxfleming colinxfleming requested a review from lomky December 1, 2024 18:01
@colinxfleming colinxfleming merged commit a00ce8b into main Dec 18, 2024
3 checks passed
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.

Prep for Rails 8: Define enums with positional arguments
2 participants