Add `attribute_for_database` attribute method by kamipo · Pull Request #40456 · rails/rails

I've been reported an issue on enum from friends, they want a way to get mapped value, but currently there is no reliable way to get that value. If a record is loaded from database, attribute_b...