[Feature][ActiveRecord::Enum] adds method for getting enum label from integer

17 views
Skip to first unread message

Anthony Hernandez

unread,
Mar 20, 2020, 3:00:53 PM3/20/20
to Ruby on Rails: Core
I'd like to open a PR for this -- I have the change written and ready to go. It's simple enough. The idea is to provide a "nice" way for going from an integer returned from the database
to the corresponding label defined for an enum field without resorting to hash methods. I've written up details (and the change) here:

Reply all
Reply to author
Forward
0 new messages