Hey all,
I have a select(“post”, “person_id”, Person.find_all.collect {|p|
[ p.name, p.id ] }) and I would like to submit the value when it is
selected.
I know I have to do something like this: onchange="<%=
remote_function(:update => “options”,
:url => { :action => :update_options })
but how can I pass it the value of the selected option?
This will run the method ‘vehicle_body_type_select’ in the current
controller, and when that action is executed the currently selected
value will be in ‘params[:vehicle][:body_type]’ from the :with
parameter. The method passes back Javascript via RJS statements which
are evaluated by the :complete item.
David
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.