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

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

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
gone.

Processing InvitationsController#update (for 127.0.0.1 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?

Thanks
This topic is locked and can not be replied to.