Closed henrymzhao closed 7 years ago
I searched for "enum ActiveRecord store" and came up with nothing. I suppose it could be done but I fail to see why one would want to move to enum to a serialized column.
1.You'll lose performance on the scopes you get with enum.
Thank you for your input, I've switched to a String type instead, which works a lot better, and makes integration with the old code a lot easier.
Hello,
Apologies this is not a "bug", but github doesn't really provide another way to ask a question.
I'm trying to use this gem to handle preference settings for my project, and I'm trying to get each "setting" to correspond to a defined
enum
. I have defined my settings as an integer like:foo_setting Integer, default: 0
, and I'd like the integer to go through a pre-defined enum and return a param, instead of a single integer.Is this possible with this gem? I'm transitioning from defining each setting as a separate column in the database, which then linked to an enum list.
Thanks for your time.