This project is archived and is in readonly mode.

#3112 ✓invalid
Jarl Friis

link_to does not merge parameters into request when :method => put

Reported by Jarl Friis | August 28th, 2009 @ 10:05 AM

In an action view I have a line like this

link_to 'Update timestamp', order_path(order, :update_timestamp => true), :method => :put

The generated HTML, creates a link with a onclick attribute that ensures that the request is done via PUT (or rather "simulated put" using a POST), however this form does not include the parameter ":update_timestamp => true".

So the generated HTTP request when I click the link is a HTTP REQUEST is like this

POST /orders/12?update_timestamp=true HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 77

But when it hits my controller the params is empty, where as I would have expected params[:order][:update_timestamp] == true


Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket