Calling controllers in a controller


#1

Hi

I’m a noob, so, please bare with me. I tried to find it online but could
not. Can i call a controller from inside a controller?

class UsersController < ApplicationController
def index
do soem thing
redirect_to :action => new_controller
end

Thanks


#2

Hi Sushruth,

What I think your looking for is to redirect to another controller.

redirect_to :controller => ‘controller_name’, :action =>‘action’

Hope this helps…

Cheers


#3

liquid wrote:

Hi Sushruth,

What I think your looking for is to redirect to another controller.

redirect_to :controller => ‘controller_name’, :action =>‘action’

Hope this helps…

Cheers

Thanks very much, I wors now :slight_smile: