Date published: 4-28-2014
Rails version: 4.0.0
Layouts
One of the good things about using Ruby on Rails is that you can setup a basic site layout and it will automatically be applied to every page on the site. If you’ve ever worked on a site that didn’t use layouts, then you know what a timesaver this can be. Rather than having to modify every single page when you want to make a change to the header for example, you make one change in the layout file, and all the pages on your site will now use the updated header. There may be times when you want to disregard the default layout or use a different one entirely, such as when the user wants to print something and wants their information without all the extraneous elements like the header, footer, or navigation sidebar. Continue reading »