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 =>}) %>

My db layout:

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,

Try passing them in your url options.


… :url => { :action => post_new_comment, :article_id =>} …

Thank you, it works fine :-).