title: Use Rails form element in 'show' view?
body: <p>I'd like to have a split-dropdown button (<a href="http://twitter.github.com/bootstrap/components.html#buttonDropdowns" rel="nofollow">twitter bootstrap style</a>) in my show view so user can change the current 'state' for their 'job' using a collection (bids, in_progress, complete, canceled).</p>
  
  <p>Here's how I'm current changing the states in the my _form (works fine):</p>
  
  <pre><code>&lt;%= f.input :state, :collection =&gt; %w(bids in_progress complete canceled), :checked =&gt; 'bids', :as =&gt; :radio_buttons %&gt;
  </code></pre>
  
  <p>But I'd rather the user not have to go through the entire form just to change the state. Would be nice for them to change the state 'on the fly' if you will.</p>
  
  <p>How should I go about converting this to a dropdown and use it outside of my form? Note - I still want to retain the ratio collection in my form.</p>
  
  <p>Should I create a partial with just the button and render it in the 'show' view? Do I need to add something to my controller? Maybe it would be easier/better to use javascript? Lots of questions, not sure where to start. Thanks.</p>
  
  <p><strong>Update</strong> </p>
  
  <p>I've created a partial with this:</p>
  
  <pre><code>&lt;%= simple_form_for(@job, :remote =&gt; true) do |f| %&gt;
      &lt;%= f.input :state, collection: [ ['bids', 'Bid'], ['in_progress', 'In Progress'], ['complete', 'Complete'] ], label_method: :last, value_method: :first, :onchange =&gt; 'this.form.submit()' %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>And added this bit of javascript:</p>
  
  <pre><code>$(this.form).submit();
  </code></pre>
  
  <p>This is not working - am I on the right track? It seems like this should submit the form.</p>