# Help with link\_to\_remote

**URL:** <https://www.ruby-forum.com/t/help-with-link-to-remote/127816>\
**Category:** Rails\
**Created:** [February 1, 2008, 2:53pm UTC](https://www.ruby-forum.com/t/help-with-link-to-remote/127816 "2008-02-01T14:53:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![masch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3ec8ea/32.png) [@masch](https://www.ruby-forum.com/u/masch)\
**Post date:** [February 1, 2008, 2:53pm UTC](https://www.ruby-forum.com/t/help-with-link-to-remote/127816/1 "2008-02-01T14:53:35Z")

</div>

Hi!.  
Is there a way to call to another controller with link\_to\_remote?  
Something like this:  
\<%= link\_to\_remote “Tests”, {  
:controller =\> “tests”,  
:action =\> “tester”  
}  
%\>

Salu2…

---

<div class="post-metadata">

**Author:** ![masch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3ec8ea/32.png) [@masch](https://www.ruby-forum.com/u/masch)\
**Post date:** [February 1, 2008, 3:00pm UTC](https://www.ruby-forum.com/t/help-with-link-to-remote/127816/2 "2008-02-01T15:00:37Z")

</div>

explain better…

you can specify the controller you want on :controller =\> ‘something’  
or do you want to call two controllers?

masch wrote:

> Hi!.  
> Is there a way to call to another controller with link\_to\_remote?  
> Something like this:  
> \<%= link\_to\_remote “Tests”, {  
> :controller =\> “tests”,  
> :action =\> “tester”  
> }  
> %\>
> 
> Salu2…

---

<div class="post-metadata">

**Author:** ![masch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3ec8ea/32.png) [@masch](https://www.ruby-forum.com/u/masch)\
**Post date:** [February 1, 2008, 9:18pm UTC](https://www.ruby-forum.com/t/help-with-link-to-remote/127816/3 "2008-02-01T21:18:47Z")

</div>

Right, i used :controller =\> “Tests”, but it doesn’t work. The html  
result is :  
\<a href="#" onclick="new Ajax.Request(’/test/tester’,----  
is it right?  
Because it never call to tests controller.

Salu2…

---

<div class="post-metadata">

**Author:** ![masch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3ec8ea/32.png) [@masch](https://www.ruby-forum.com/u/masch)\
**Post date:** [February 1, 2008, 10:10pm UTC](https://www.ruby-forum.com/t/help-with-link-to-remote/127816/4 "2008-02-01T22:10:17Z")

</div>

how do you know your controller never gets called?

what do you have on the ‘tester’ action on the tests\_controller.rb?

when you use link\_to\_remote you make a ajax call, is this what you want?

masch wrote:

> Right, i used :controller =\> “Tests”, but it doesn’t work. The html  
> result is :  
> \<a href="#" onclick="new Ajax.Request(’/test/tester’,----  
> is it right?  
> Because it never call to tests controller.
> 
> Salu2…

---

<div class="post-metadata">

**Author:** ![masch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3ec8ea/32.png) [@masch](https://www.ruby-forum.com/u/masch)\
**Post date:** [February 1, 2008, 10:59pm UTC](https://www.ruby-forum.com/t/help-with-link-to-remote/127816/5 "2008-02-01T22:59:41Z")

</div>

Sorry…watching code to explain the problem i realize that the real  
controller name was test and not testS…  
Thanks you Some much for you help!!!..😃

Salul2…
