I want to render a partial depending on a selection in selection box. This looks trivial but I can’t find an example.
All help is greatly appreciated.
Regards
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.
If you’re simply trying to render a partial on the page that the form submits to,
So if you had a select box like
You’d need to render
Assuming you have _partial1.html.erb and partial2.html.erb in your view folder