[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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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: