When an action in a controller has been called, can I then call another action from that action?
And what would happen if both actions have some template to render?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes you can, if it is in the same controller.
Calling
zoowill provide the template for zoo with instances for@xand@a. Neither foo or bar will be rendered. If you have explicitly set arendermethod, then you might get a double render error, unless youreturnbefore the second render is called.