Best way to add new items to a select?

hey all,
I have a select tag like this:

<%= select ‘movie’,‘director_id’,Director.find(:all).collect {|x|
[x.name, x.id]} %>

I would like to add a new director in case it’s missing from the
select. I would like to do this the Ajax way maybe with a
in_place_select? or by putting an rjs link that replace the select
with a textfield and a button but I’m not sure maybe there’s a better
way.
I also like how they do it in google mail, where the last option of
the select is a “create a new label”, then if I click on that option
in the select it popups a dialog and then updates the select.

Any ideas or links to demo?

thanx in advance

Pat

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