RE: [Rails] Re: React on select_tag (onchange)

Try searching the web for keywords remote_function and select_tag

For example, this is close to what you want.

<%= select_tag( :sort_by, options_for_select([["Sort by:",0],["Name",'name'],["Price",'price'], ["Date Listed",'id']],0),         :onchange => remote_function( :with => "'sort_by='+$(\"sort_by\").value",                         :loading => "false;", :url => { :controller => 'products', :action => :change_order } ) ) %>

I realize this is largely a question of taste, but wouldn't Proper Rails Style prefer to invoke the remote function via the observe_field helper rather than the onchange attribute value? I ask in all sincerity, not having a great grasp yet of Proper Rails Style.

- donald