title: Rails update a field without form
body: <p>I've Rails 4.0 application with 'order' model which has a status field. While invoking a 'show' action to get 'order' object details, I want to add additional buttons on the 'Show page', in addition to 'Edit' and 'Back'. First one to mark 'update status' which will only update status of this order object to '1' and the second button to mark 'close order' which will only update status of this order object to 2. How can I achieve this without an 'Edit' action/view? Do I need to use form_tag to add these buttons and do I need to write 2 new methods in OrdersController to update the status? </p>
  
  <p>Following is my show.html.erb with two buttons I want add...</p>
  
  <pre><code>&lt;p&gt;
    &lt;strong&gt;Name:&lt;/strong&gt;
    &lt;%= @order.name %&gt;
  &lt;/p&gt;
  &lt;p&gt;
    &lt;strong&gt;Status:&lt;/strong&gt;
    &lt;%= @order.status %&gt;
  &lt;/p&gt;
  &lt;%= link_to 'Edit', edit_order_path(@order) %&gt; |
  &lt;%= link_to 'Back', orders_path %&gt; |
  &lt;%= link_to 'Shipped', '#', :name =&gt; 'shipped_button' %&gt; |
  &lt;%= link_to 'Close',   '#', :name =&gt; 'close_button' %&gt;
  </code></pre>
  
  <p>If I click on 'Shipped' or 'Close' button they both will be called on to 'OrdersController' as a 'GET' request as shown below,   </p>
  
  <p>..
  Started GET "/orders/1?name=shipped_button" for 127.0.0.1 at 2014-11-21 15:40:38 -0800<br>
  Processing by OrdersController#show as HTML<br>
    Parameters: {"name"=>"shipped_button", "id"=>"1"}<br>
    Order Load (0.1ms)  SELECT  "orders".* FROM "orders"  WHERE "orders"."id" = ? LIMIT 1  [["id", 1]]<br>
    Rendered orders/show.html.erb within layouts/application (1.9ms)<br>
  Completed 200 OK in 50ms (Views: 47.8ms | ActiveRecord: 0.1ms)  </p>
  
  <p>How can I update the model with appropriate status field update. 'status' is an integer field in the 'orders' model.</p>