# Link\_to :remote with parameters not working in Rails 3?

**URL:** <https://www.ruby-forum.com/t/link-to-remote-with-parameters-not-working-in-rails-3/187547>\
**Category:** Rails\
**Created:** [April 25, 2010, 2:06pm UTC](https://www.ruby-forum.com/t/link-to-remote-with-parameters-not-working-in-rails-3/187547 "2010-04-25T14:06:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wanderwelten](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/4da419/32.png) [@Wanderwelten](https://www.ruby-forum.com/u/Wanderwelten)\
**Post date:** [April 25, 2010, 2:06pm UTC](https://www.ruby-forum.com/t/link-to-remote-with-parameters-not-working-in-rails-3/187547/1 "2010-04-25T14:06:37Z")

</div>

Hey community,

since some day i dive into Rails and started with the basics for  
developing applications. Yesterday i spend a lot of time for how to  
create a remote’able link\_to with parameters. What orginally should  
worked is this code-sample:  
\<%= link\_to “Click here”, index\_path, :remote =\> true, :picture =\>  
“12” %\> which creates the following html-code: [Click here](https://www.ruby-forum.com/index)  
My controller receive’s the Ajax Get-Request but without any parameter  
(checked my logfiles too).

After some testing i found a solution for submitting paramters on a  
remote call:  
\<%= link\_to “Click here”, { :controller =\> :index, :action  
=\> :index, :picture =\> 21 }, :remote =\> true %\>  
[Click here](https://www.ruby-forum.com/times?picture=21)

So, why does the first example not working in Rails 3 anymore? And how  
should i do it correctly in Rails 3?

Greets, Gerrit

---

<div class="post-metadata">

**Author:** ![Wanderwelten](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/4da419/32.png) [@Wanderwelten](https://www.ruby-forum.com/u/Wanderwelten)\
**Post date:** [May 10, 2010, 2:01pm UTC](https://www.ruby-forum.com/t/link-to-remote-with-parameters-not-working-in-rails-3/187547/2 "2010-05-10T14:01:35Z")

</div>

I found now a solution…the params must be set into the target-  
parameter  
\<%= link\_to image\_tag("/images/sample.gif"), product\_path(:customer\_id  
=\> customer.id), :remote =\> true %\>
