# Params for link\_to\_remote

**URL:** <https://www.ruby-forum.com/t/params-for-link-to-remote/143264>\
**Category:** Rails\
**Created:** [July 16, 2008, 9:30pm UTC](https://www.ruby-forum.com/t/params-for-link-to-remote/143264 "2008-07-16T21:30:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Parity](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c2a13f/32.png) [@Parity](https://www.ruby-forum.com/u/Parity)\
**Post date:** [July 16, 2008, 9:30pm UTC](https://www.ruby-forum.com/t/params-for-link-to-remote/143264/1 "2008-07-16T21:30:01Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![Parity](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c2a13f/32.png) [@Parity](https://www.ruby-forum.com/u/Parity)\
**Post date:** [July 16, 2008, 10:00pm UTC](https://www.ruby-forum.com/t/params-for-link-to-remote/143264/2 "2008-07-16T22:00:31Z")

</div>

Try passing them in your url options.

i.e.

… :url =\> { :action =\> post\_new\_comment, :article\_id =\>  
@article.id} …

---

<div class="post-metadata">

**Author:** ![Parity](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c2a13f/32.png) [@Parity](https://www.ruby-forum.com/u/Parity)\
**Post date:** [July 17, 2008, 2:06am UTC](https://www.ruby-forum.com/t/params-for-link-to-remote/143264/3 "2008-07-17T02:06:47Z")

</div>

Thank you, it works fine :-).
