Complete the code to include the main stylesheet in a Rails layout.
<%= stylesheet_link_tag '[1]', media: 'all' %>
The default main stylesheet in Rails is named application.css. Using stylesheet_link_tag 'application' includes it properly.
Complete the code to include the main JavaScript file using the asset pipeline helper.
<%= javascript_include_tag '[1]' %>
The default JavaScript file in Rails asset pipeline is application.js. Using javascript_include_tag 'application' includes it correctly.
Fix the error in the asset path helper to correctly reference an image named 'logo.png'.
<%= image_tag '[1]' %>
In Rails asset pipeline, just the filename logo.png is enough. The helper knows to look in the assets/images folder.
Fill both blanks to create a CSS file that uses SCSS syntax and is processed by the asset pipeline.
@import '[1]'; body { background-color: [2]; }
SCSS files can import other SCSS partials like _variables.scss by name without underscore or extension. Colors can be hex codes like #fff.
Fill all three blanks to create a JavaScript manifest file that requires jQuery, requires all files in a folder, and initializes a function on document ready.
//= require [1] //= require_tree [2] $(document).ready(function() { [3] });
The manifest uses require jquery to include jQuery, require_tree . to include all files in the current folder, and the function logs a message when the document is ready.