title: onchange remote_function in rails 3 - is it valid? how can I accomplish it unobtrusively?
body: <p>I have two questions.</p>
  
  <p>I have a select tag in a rails 3 application that looks like this:</p>
  
  <pre><code> &lt;%= select(@adverse_event_template_settings, 
      "display_arms", 
      options_for_select([["Yes", true], ["No", false]]), 
      { :selected =&gt; :display_arms },  
      :onchange =&gt; remote_function(:update =&gt; "display_arms", 
            :method =&gt; "put", 
            :with =&gt; "'display_arms=' + value", 
            :url =&gt; { :controller =&gt; :adverse_event_template_settings, 
                 :action =&gt; :update, :id =&gt; @aets.id})) %&gt;
  </code></pre>
  
  <p>This does what I want it to do- that is, call a controller action when the select box value changes.</p>
  
  <p>Even though this works, I want to know 1) Is this valid in rails 3? I know it is obtrusive javascript, but remote_function working in rails 3 seems weird to me - is something wrong here?</p>
  
  <p>and if the above is NOT valid, I really really really would like to know 2) how can I accomplish this same action (i.e. call the same action in the same controller) unobtrusively? Is there a way to do this simply and cleanly in rails 3? I desperately need coding help with this part.</p>
  
  <p>Thank you so much!
  Let me know if you need more details.</p>