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.
David L. (Guest)
on 2007-04-02 00: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.