--Layout shaping --A layout template is a collection of common parts of an application view file. ――By describing the parts that are common to all views such as head information, headers, and footers, each template file only needs to describe its individual appearance. --A file called appilication.html.erb becomes a layout template --What is the yield method? A method for expanding each template file to a layout template. -By having <% = yield%>, you can create a mechanism that the description of each view file is aggregated in the body element. --Apply CSS file --What is the stylesheet_link_tag method? A helper method that allows you to specify the CSS file to read. --The application.css file is a file that Rails has prepared from the beginning to organize CSS files. --The description require_tree in it has a function to read all CSS files under the directory given as an argument in alphabetical order.
Recommended Posts