-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
Hi! Your approach looks very promising. There is one feature that might be interesting, but I wasn't able to find it in the README and a glimpse into the code did not reveal it either: does ActiveEnum support String keys (including a String column in the DB)?
Background: https://api.rubyonrails.org/v7.0/classes/ActiveRecord/Enum.html
Finally it's also possible to use a string column to persist the enumerated value. Note that this will likely lead to slower database queries:
class Conversation < ActiveRecord::Base
enum :status, active: "active", archived: "archived"
end
Metadata
Metadata
Assignees
Labels
No labels