:controller => "/video" will fix it. The leading / removes any existing
namespace or scope on the path.

Martin Emde
Tw: @martinemde


On Mon, Aug 17, 2009 at 2:05 PM, Scott Olmsted <[email protected]> wrote:

>
> Another redirect problem, sigh.
>
> The project includes these two controllers:
>   /controllers/video_controller.rb
>   /controllers/*my*/video_controller.rb
>
> At the end of the upload action in /my/video_controller.rb I put
>
>   redirect_to :controller => 'video', :action => 'show', :id => @
> composition.id
>
> but Rails 2.3.2 redirects to  /my/video/show/486  instead of where I want:
> /video/show/486 .
>
> The routes file has just a root path in addition to the defaults:
>
>   map.root :controller => "home"
>   map.connect ':controller/:action/:id'
>   map.connect ':controller/:action/:id.:format'
>
> I've tried a few things, including redirect_to :controller => '/video', but
> so far nothing has worked. How do I tell it to find the controller in
> /controllers and not /controllers/my ?
>
> Thanks,
>
> Scott
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to