Forum: Ruby on Rails Adding to select list

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B5b916534715bd663224385c2760fd6b?d=identicon&s=25 Brian Penrose (bpenrose112)
on 2008-12-23 14:34
I have several select lists on a form generated via collection_select
pulling values from the database.  What I would like to do is, if new
components need to be added to a select list (new options), I am
providing a link beside the select list which will pop-up a small form
to add a new item to the list.  Upon saving the new item, I would like
the list on the form (parent window) to refresh, so that the new item
can be selected.  I have tried both opener.location.reload(), which
updates the lists but unfortanately wipes out all fields on the form,
and window.opener.history.go(0), which keeps the field values, but does
not refresh the select lists as needed.  Any suggestions on how I can
accomplish this? TIA.
Af9a9013100ddf2dbb0ca13487b60f8b?d=identicon&s=25 Ivor Paul (ivor)
on 2008-12-24 16:11
(Received via mailing list)
How about refreshing the select list using rjs?

On Tue, Dec 23, 2008 at 3:34 PM, Brian Penrose <
This topic is locked and can not be replied to.