# Redirect\_to outside of a module

**URL:** <https://www.ruby-forum.com/t/redirect-to-outside-of-a-module/63419>\
**Category:** Rails\
**Created:** [June 15, 2006, 2:15am UTC](https://www.ruby-forum.com/t/redirect-to-outside-of-a-module/63419 "2006-06-15T02:15:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gustavo\_Beathyate](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/dbc845/32.png) [@Gustavo\_Beathyate](https://www.ruby-forum.com/u/Gustavo_Beathyate)\
**Post date:** [June 15, 2006, 2:15am UTC](https://www.ruby-forum.com/t/redirect-to-outside-of-a-module/63419/1 "2006-06-15T02:15:58Z")

</div>

Hello List,

If I have a module and the address looks like /  
admin/:controller/:action and I want to create a link  
to /:controller/:action, how do I have to specify that in a ‘link\_to’  
or in a ‘redirect :controller =\>’ statement.  
It doesn’t strip the /admin part from it, which makes sense, but I  
need to go to a controller in the root.

TIA,

Gustavo

---

<div class="post-metadata">

**Author:** ![Gustavo\_Beathyate](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/dbc845/32.png) [@Gustavo\_Beathyate](https://www.ruby-forum.com/u/Gustavo_Beathyate)\
**Post date:** [June 15, 2006, 3:05am UTC](https://www.ruby-forum.com/t/redirect-to-outside-of-a-module/63419/2 "2006-06-15T03:05:24Z")

</div>

Good evening,

I’m putting up a web site for an applied mathematician. Consequently, I  
need a graphics capability that will allow me to display some simple x-y  
curves on a graph (that is, I’ll be supplied with a set of x and y  
points and I have to plot a curve for these points).

I’d appreciate any advice…

Thank you,  
Pat

---

<div class="post-metadata">

**Author:** ![Gustavo\_Beathyate](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/dbc845/32.png) [@Gustavo\_Beathyate](https://www.ruby-forum.com/u/Gustavo_Beathyate)\
**Post date:** [June 15, 2006, 3:20am UTC](https://www.ruby-forum.com/t/redirect-to-outside-of-a-module/63419/3 "2006-06-15T03:20:51Z")

</div>

Have a look at Geoffrey Grosenbach’s work at his blog http://  
[nubyonrails.com/](http://nubyonrails.com/) (in the Open Source Products category)

I haven’t had a play with any of them myself, but they look pretty cool.

---

<div class="post-metadata">

**Author:** ![Gustavo\_Beathyate](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/dbc845/32.png) [@Gustavo\_Beathyate](https://www.ruby-forum.com/u/Gustavo_Beathyate)\
**Post date:** [June 16, 2006, 2:36am UTC](https://www.ruby-forum.com/t/redirect-to-outside-of-a-module/63419/4 "2006-06-16T02:36:30Z")

</div>

On 15-jun-2006, at 2:13, Gustavo Beathyate wrote:

> Hello List,
> 
> If I have a module and the address looks like /  
> admin/:controller/:action and I want to create a link  
> to /:controller/:action, how do I have to specify that in a  
> ‘link\_to’ or in a ‘redirect :controller =\>’ statement.  
> It doesn’t strip the /admin part from it, which makes sense, but I  
> need to go to a controller in the root.

Prefix the controller name with a slash. This is confusing, I know.

–  
Julian ‘Julik’ Tarkhanov  
please send all personal mail to  
me at julik.nl

---

<div class="post-metadata">

**Author:** ![Gustavo\_Beathyate](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/dbc845/32.png) [@Gustavo\_Beathyate](https://www.ruby-forum.com/u/Gustavo_Beathyate)\
**Post date:** [June 16, 2006, 12:42am UTC](https://www.ruby-forum.com/t/redirect-to-outside-of-a-module/63419/5 "2006-06-16T00:42:37Z")

</div>

Damien,  
Thank you…I’ll be working this…I’ll let you know how I make out.  
Cheers,  
Pat
