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 to new ActiveRecord enum args, not deprecated in Rails 7.2 #182

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

jrochkind
Copy link
Contributor

@jrochkind jrochkind commented Aug 19, 2024

Rails 7.2 says:

DEPRECATION WARNING: Defining enums with keyword arguments is deprecated and will be removed
in Rails 8.0. Positional arguments should be used instead:

enum :kithe_model_type, {:collection=>0, :work=>1, :asset=>2}

Turns out new form is only available in Rails 7.0, and we're still supporting Rails 6.0 and 6.1 for some reason, so we'll put it in a condition on rails version.

Rails 7.2 says:
```
DEPRECATION WARNING: Defining enums with keyword arguments is deprecated and will be removed
in Rails 8.0. Positional arguments should be used instead:

enum :kithe_model_type, {:collection=>0, :work=>1, :asset=>2}
```
@jrochkind jrochkind merged commit 5288623 into master Aug 19, 2024
6 checks passed
@jrochkind jrochkind deleted the new_enum_args branch August 19, 2024 19:58
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.

1 participant