Don’t forget: “render :layout => …” should appear below any variables in your controller.
I’ve spent a few hours trying to get the @variables set in my controller to show up in my layout. After much frustration and trying all kinds of fancy ways around my problem, it suddenly occurred to me that I was simply loading the layout before the variables; I was loading them in the wrong order! Grrr…..
If you are having problems with variables not loading properly, check the order you call the render. It might save you a headache and the need for as much Pepsi as I went through trying to figure this stupid thing out.