Params for link_to_remote

Hello :-),

i want to use ‘link_to_remote’ to create a simple form on the website.
The form is a simple editor to post a comment to an article. I need to
know the article_id in the new view/controller. With ‘render’
everything works fine, but ‘link_to_remote’ doesnt work with :params :-
(

here is my code of the article view:

<%= link_to_remote("new comment", :update => 'editor', :url => new_comment_path, :params => {:article_id => @article.id}) %>

My db layout: http://erdbeere.net/media/db_layout.png

If anyone have an idea i would be happy to read it^^. I used google to
find any useful information, but i failed. The only parameter I found
is ‘:with’, but it looks, that it is only for javascript.

Have a nice day,
Patrick

Try passing them in your url options.

i.e.

… :url => { :action => post_new_comment, :article_id =>
@article.id} …

Thank you, it works fine :-).