Forum: Ruby on Rails Replace value after retrieving from database

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
3efac2b493d393d9a8f00a90d4a051ed?d=identicon&s=25 David Lelong (drlelon)
on 2007-04-01 22:14

I have values in my database stored as integers:

1, 2, 3, 4, 5

When I retrieve and display these values in a List or Show, I want to
map them to text such as:

Text1, Text2, Text3, Text4, Text5

What's the easiest way to do this?


This topic is locked and can not be replied to.