Noob question: calling a view in a different folder

I have a ‘user’ folder and an ‘appname’ folder. When a user signs up, i
want to call an action to send them to the ‘list’ page, which is in
‘appname’. However i can’t work out how to call an action in a
different controller/view in a different view folder (incidentally,
which is called - the controller action or the view page?).

I’ve been trying stuff like

redirect_to :action => “AppnameController.list”
redirect_to :action => “…/appname/list”

etc…

Can anyone help please? This feels like it’s simple but i just don’t
know the syntax.

Max W. wrote:

I have a ‘user’ folder and an ‘appname’ folder. When a user signs up, i
want to call an action to send them to the ‘list’ page, which is in
‘appname’. However i can’t work out how to call an action in a
different controller/view in a different view folder (incidentally,
which is called - the controller action or the view page?).

I’ve been trying stuff like

redirect_to :action => “AppnameController.list”
redirect_to :action => “…/appname/list”

etc…

Can anyone help please? This feels like it’s simple but i just don’t
know the syntax.

you might be looking at

redirect_to :controller => ‘appname’, :action => ‘list’
(if the ‘list’ action is in the appname; redirects there no matter what
controller you are in)

render :template => ‘appname/list’
(if you want to render the template, you can do this in the controller
or the view. the path is relative to the app/view directories)

hth

Shai R. wrote:

Max W. wrote:

I have a ‘user’ folder and an ‘appname’ folder. When a user signs up, i
want to call an action to send them to the ‘list’ page, which is in
‘appname’. However i can’t work out how to call an action in a
different controller/view in a different view folder (incidentally,
which is called - the controller action or the view page?).

I’ve been trying stuff like

redirect_to :action => “AppnameController.list”
redirect_to :action => “…/appname/list”

etc…

Can anyone help please? This feels like it’s simple but i just don’t
know the syntax.

you might be looking at

redirect_to :controller => ‘appname’, :action => ‘list’
(if the ‘list’ action is in the appname; redirects there no matter what
controller you are in)

render :template => ‘appname/list’
(if you want to render the template, you can do this in the controller
or the view. the path is relative to the app/view directories)

hth

Never mind, i found the answer! I need to pass the controller as well -

redirect_to :controller => “appname”, :action => “list”

Thanks anyway!

you might be looking at

redirect_to :controller => ‘appname’, :action => ‘list’
(if the ‘list’ action is in the appname; redirects there no matter what
controller you are in)

render :template => ‘appname/list’
(if you want to render the template, you can do this in the controller
or the view. the path is relative to the app/view directories)

hth

Ah, that second bit’s useful as well. Thanks a lot!