fix: update enum syntax for Rails 7.2 compatibility

- Change enum availability from keyword args to positional args
- Fix deprecation warning: 'Defining enums with keyword arguments is deprecated'
- Required for Rails 7.2.2.2 enum syntax changes
- Application now starts successfully with overmind
This commit is contained in:
Sojan Jose
2025-08-14 14:20:21 +02:00
parent 3c67d93426
commit 54bd800a82
+1 -1
View File
@@ -62,7 +62,7 @@ class User < ApplicationRecord
# TODO: remove in a future version once online status is moved to account users
# remove the column availability from users
enum availability: { online: 0, offline: 1, busy: 2 }
enum :availability, { online: 0, offline: 1, busy: 2 }
# The validation below has been commented out as it does not
# work because :validatable in devise overrides this.