Controllers!?


#1

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


#2

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.


#3

On Mar 4, 4:52 pm, “libsfan01” removed_email_address@domain.invalid 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


#4

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?