rails retrieving button_to parameter in the controller <p>I iterate over an array of CartItem class I created and populate a view file. </p> <pre><code>&lt;td&gt;&lt;%= button_to "remove", :action =&gt; :remove_from_cart, :id =&gt; cart_item %&gt;&lt;/td&gt; </code></pre> <p>I would like to be able to get a CartItem instance from params[:id] in the remove_from_cart. <code>param[:id]</code> returns something like <code>"#&lt;CartItem:0xb77a3dcc&gt;":String</code> and i could not figure out how to treat it like a CartItem object. </p> <p>I know the code above works for objects descending from ActiveRecord::Base, and CartItem does not descend from it. I am guessing that might be the reason.</p> <p>any pointers would be much appreciated, thanks</p>