If I have a field that takes a numerical input, like 0, 1, 3... but want to assign a friendly string to it, how do I get the selection box to show the label?
I know I can add a selection box like this:
input user, :role, [collection: ~w(0 1 2) ]
Although, how do I get each of those values to show on the webpage as Customer, Moderator, Admin instead of as 0, 1, 2
If I have a field that takes a numerical input, like
0, 1, 3...
but want to assign a friendly string to it, how do I get the selection box to show the label?I know I can add a selection box like this:
Although, how do I get each of those values to show on the webpage as
Customer, Moderator, Admin
instead of as0, 1, 2