Formatting output with lookup values

Is there an easy way to apply lookup values to output without using a
lookup table?

For example, I have a users table with a user id. When I display a list
of users, I’d like to have “1” mapped to “John”, “2” outputs as
“Beavis”, etc.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs