Select box selected on value ? w option_for_select

I have a select box in my view, with an option for select, a variable
for selected value, and an Ajax observe_field

<%= options_for_select({ “most cheerful” => “1”, “most beautiful” =>
“2”, “most displayed” => “3”}, @sort_criteria) %>

    <%= observe_field("most_criteria",
          :update => "results_table",
          :url => { :action => :list , :params =>

@params.merge({:page=> nil })},
:with => “‘sort=’+value”,
:on => “changed”)

when changed I get the params[:sort] set to the seelcted value…
but setting @sort_criteria to params[:sort] doesn’t select anything at
what’s the correct params to be set ?



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