Hello guys, sorry for this very newbie question, but I don’t understand
I got a scaffolded model named User, it has an index action in his own
controller (courtesy of “script/generate scaffold”). This action looks
render :action => ‘list’
So from here what I see this method does is:
- Call the list action to set a pair of variables (it’s not relevant
- Render the view for the list action.
The URL doesn’t change from http://localhost:3000/users to anything
stays the same.
My doubt is: Why something like this doesn’t work?
redirect_to :list # I just want to go to the list action in case no
I thought that would just redirect me to the
http://localhost:3000/users/list. But, I get the following error if I
the code above instead of what was there originally (look at first code
“stack level too deep”
Shouldn’t the redirect_to just take me to the right URL?
In this case if I type this:
I would expect it to take me to:
And since that isn’t the case I would appreciate if someone could
me how is it really working.