Controllers!?

when i put: render :action=>“list” in my “index” method of my
controller it doesn’t use/create the variables created in the list
method it only gives the “list” view? is that supposed to happen

Marc Rice wrote:

when i put: render :action=>“list” in my “index” method of my
controller it doesn’t use/create the variables created in the list
method it only gives the “list” view? is that supposed to happen

try

redirect_to :action => “list”

instead.

On Mar 4, 4:52 pm, “libsfan01” [email protected] wrote:

when i put: render :action=>“list” in my “index” method of my
controller it doesn’t use/create the variables created in the list
method it only gives the “list” view? is that supposed to happen

Yes. Calling render :action => “list” doesn’t actually run the method
called ‘list’. It just renders the default view template that would
have been used if you have called the action ‘list’ normally.

Chris

Yes. Calling render :action => “list” doesn’t actually run the method
called ‘list’. It just renders the default view template that would
have been used if you have called the action ‘list’ normally.

Chris

So am i right to assume that you can run different actions on the same
layout and the variables referenced in the ERB will inherit whatever
values the ‘calling’ action gives them?