User selected item of Drop Down

In my view I have

form.select( :child, @children.map { | u | [0], u[1] }, { },
{ :onchange = remote_function(
:url => {:action => “rjs_call_here”},
:with => " ‘child_picked=’ +
escape(value)" ) } )

Everything works well with ajax and drop down menu.

My problem is that when the user hits submit I want the same drop down
menu as above displayed but this time with
the user selection showing.

On thought is to check in the view to see if a the user has made a
selection and then show a different drop down.

I am not sure of what method to use in order to do this.

In other words I need to reflect user choice of the drop down after
the user has clicked on the submit button.

If things are not clear.

@children is set in the controller ie:

@children = [ [“Select Child”, “”], [“John”, “1”], [“Mary”, “2”],
[“Fred”, “3”] ]

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