Skip to content

Commit

Permalink
Switch to new ActiveRecord enum args, not deprecated in Rails 7.2
Browse files Browse the repository at this point in the history
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}
```
  • Loading branch information
jrochkind committed Aug 19, 2024
1 parent ac6eb3c commit 5bc53e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/kithe/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Kithe::Model < ActiveRecord::Base
#
# Since the rails enum uses an int field, this doens't take up too much extra
# space in pg or anything, and is convenient.
enum kithe_model_type: { collection: 0, work: 1, asset: 2}
enum :kithe_model_type, { collection: 0, work: 1, asset: 2}

attr_json_config(default_accepts_nested_attributes: { reject_if: :all_blank })

Expand Down

0 comments on commit 5bc53e1

Please sign in to comment.