I am trying to have one image show for the header on the root page of a RoR site, and all the other pages will randomly show one of three other picture. The problem is I don’t know how to get this to work. Any ideas?
Share
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.
In your application layout you can define the default header like this:
And in the view for your home page, you would override it using
content_for: