Forum: Ruby on Rails question about link_to_remote

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.
MarcS (Guest)
on 2007-07-28 01:22
(Received via mailing list)
Hi,

I got the following problem

this is my code for link_to_remote
[<%= link_to_remote("Delete", {:url =>
members_article_image_url(list_item), :method => :delete, :article_id
=> @article.id}, :confirm => "are you sure?") %>]

But rails seems to ignore the article_id parameter and doesn't pass it
on.
from the console: Parameters: {"_method"=>"delete",
"action"=>"destroy", "id"=>"21", "controller"=>"members/
article_images"}

Isn't rails supposed to create the parameter or am I doing something
wrong?

thanks for your help

Marc
MarcS (Guest)
on 2007-07-28 03:05
(Received via mailing list)
I figured it out
sorry about the stupid question.
Obviously the :article_id=@article.id gotta go into the :url parameter
This topic is locked and can not be replied to.