This project is archived and is in readonly mode.

#1040 ✓invalid

link_to_remote fails with :method => :put

Reported by Hang | September 13th, 2008 @ 04:54 AM | in 2.x

If you do:

link_to_remote "Update", :url => {:action => "update", :method => :put, :id =>}

It will create a post request with "method"=>"put"

Instead, you need to do:

link_to_remote "Update", :url => {:action => "update", :_method => :put, :id =>}

Comments and changes to this ticket

  • James Wilding

    James Wilding September 15th, 2008 @ 09:49 AM

    Don't think this is a bug. I think the proper usage is:

    link_to_remote("Update", :url => {:action => "update", :id =>}, :method => :put)

    From the Rails API:

    link_to_remote(name, options = {}, html_options = nil)

    The :method parameter goes in html_options - not with the :url params.

  • Pratik

    Pratik December 19th, 2008 @ 02:37 PM

    • State changed from “new” to “invalid”

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