Dynamically setting the <head> from a view

August 26, 2018

We work mostly in the ruby on rails stack. Recently I had an issue where I wanted to dynamically change info that was set in the <head> -- in our sites (and most rails sites), this is controlled by an application layout. So how do you let the view control info in the layout? Easy: content_for: In your view

And in your layout