Forum: Ruby on Rails need help with list boxes

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.
on 2007-07-28 02:20
(Received via mailing list)
Hello everybody,

I have a list box whose values i am getting from controller class.
There is a submit button below it.when it is pressed, i always loose
the value which was selected and once again the first value is
displayed. I have made the use of "selected" but everytime i want the
last value to be displayed in list box that was selected once the
submit button is pressed.

the concern rhtml code is :

  <select name="group_name">
            <% for supplier in @suppliers %>
            <option value="<%= supplier %>" > <%= supplier %> </
        <% end %>

  <br><p><input type="submit" value="Submit"/>

Any help would really be appreciated
thanks a lot,
This topic is locked and can not be replied to.