# Redirect to another controller / action form a controller

**URL:** <https://www.ruby-forum.com/t/redirect-to-another-controller-action-form-a-controller/150206>\
**Category:** Rails\
**Created:** [October 6, 2008, 2:59am UTC](https://www.ruby-forum.com/t/redirect-to-another-controller-action-form-a-controller/150206 "2008-10-06T02:59:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andres](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a4c791/32.png) [@andres](https://www.ruby-forum.com/u/andres)\
**Post date:** [October 6, 2008, 2:59am UTC](https://www.ruby-forum.com/t/redirect-to-another-controller-action-form-a-controller/150206/1 "2008-10-06T02:59:49Z")

</div>

Hi,

When Inside a controller, instead of rendering,  
is there any way to generate a dispatch to another action in another  
controller that is interpreted by the receiver controller as a  
javascript request?

---

<div class="post-metadata">

**Author:** ![andres](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a4c791/32.png) [@andres](https://www.ruby-forum.com/u/andres)\
**Post date:** [October 6, 2008, 4:25am UTC](https://www.ruby-forum.com/t/redirect-to-another-controller-action-form-a-controller/150206/2 "2008-10-06T04:25:19Z")

</div>

andres wrote:

> When Inside a controller, instead of rendering,  
> is there any way to generate a dispatch to another action in another  
> controller that is interpreted by the receiver controller

Ya:

redirect\_to :controller =\> ‘nother’, :action =\> ‘yo’

> as a javascript request?

Why? The above happens almost entirely on the server side.

---

<div class="post-metadata">

**Author:** ![andres](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a4c791/32.png) [@andres](https://www.ruby-forum.com/u/andres)\
**Post date:** [October 7, 2008, 10:51am UTC](https://www.ruby-forum.com/t/redirect-to-another-controller-action-form-a-controller/150206/3 "2008-10-07T10:51:41Z")

</div>

Will redirect\_to get the job done?
