5.2 Sass and the Asset Pipeline

One of the most notable additions in recent versions of Rails is the
asset pipeline, which significantly improves the production and
management of static assets such as CSS, JavaScript, and images. This
section gives a high-level overview of the asset pipeline and then shows
how to use a remarkable tool for making CSS called Sass, now included by
default as part of the asset pipeline.
5.3.2 Rails Routes

Now that we have tests for the URLs we want, it’s time to get them to
work. As noted in Section 3.1, the file Rails uses for URL mappings is
config/routes.rb. If you take a look at the default routes file, you’ll
see that it’s quite a mess, but it’s a useful mess—full of commented-out
example route mappings. I suggest reading through it at some point, and
I also suggest taking a look at the Rails Guides article “Rails Routing
from the outside in” for a much more in-depth treatment of routes.

To define the named routes, we need to replace rules such as

get 'static_pages/help'

with

match '/help', to: 'static_pages#help', via: 'get'
5.3.3 Named Routes

Let’s put the named routes created in Section 5.3.2 to work in our
layout. This will entail filling in the second arguments of the link_to
functions with the proper named routes. For example, we’ll convert

<%= link_to "About", '#' %>

to

<%= link_to "About", about_path %>

and so on.