Forum: Ruby on Rails Link_to + PUT + restful routes problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
comopasta G. (Guest)
on 2008-10-19 00:28

I'm trying to use link_to to access the Update action + add some extra
parameters. I'm using the default rest routes.

I can't get it working.

When I use: <%= link_to ' Accept', invitation_path, :method => :put, :id
=> '1', :command => 'accept' %>

I can get into the Update action but the parameters are lost. The :id is
the of the logged in user instead of 1, and the :command parameter is

Processing InvitationsController#update (for at 2008-10-18
23:28:34) [PUT]
  Session ID: ....65754...
  Parameters: {"authenticity_token"=>"e88240...96", "_method"=>"put",
"action"=>"update", "id"=>"5", "controller"=>"invitations

Any hints how to get this done?

This topic is locked and can not be replied to.