Forum: Ruby on Rails view name of multiselect in list instead of view

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.
8c1e6c860035cfb1f1ae7080a90d9361?d=identicon&s=25 bullring (Guest)
on 2007-04-25 18:25
(Received via mailing list)
In my model i have:

     [ 'Trivial", "1" ],
     [ "Minor", "2" ],
     [ "Major", "3" ]

in my new entry form i have:

<%=, Project::STATUS_TYPES, :prompt => "Select
Status") %>

in my view/project/list i have :
 <%= h(project.status) %>

but when my controller lists the project details it only shows the
"id" of the select instead of the name in the model.  How do i resolve
the name to id relationship for the view?

any help you have would be great,
Thank you,
This topic is locked and can not be replied to.