search for: banneradvert

Displaying 1 result from an estimated 1 matches for "banneradvert".

2010 Jul 02
6
making something available application wide
...to display a banner on every page. Ultimately I''ll be tweaking which banner is displayed via different controllers but initially I''d just like to set a single banner application wide and display it in my "_header", a partial I include in all layouts. I''ve got a BannerAdvert model, simple. If I''m in my welcome controller index action I can simply do, @banner_url = BannerAdvert.first.url in my _header partial (view) I display the url, works fine. ----- BUT - my header is called from other controllers, I don''t want to be non-dry and repeat @banner_u...