I will try to explain in detail the essence of the problem that I recently encountered. According to the textbook wrote a simple online store. Without design, with bare buttons and input fields everything was fine. But when I started working on the selection of color, something went wrong - the description of the laid out goods was not visible, more precisely, they simply did not exist.
The order of my work.
At first I made changes to the seeds file - more precisely, I simply copied them from the website of the textbook and pasted them.
Then I worked with the SASS language, in the file
depot/app/assets/stylesheets/products.css.scss
, by writing the following:/* START_HIGHLIGHT */ .products { table { border-collapse: collapse; } table tr td { padding: 5px; vertical-align: top; } .list_image { width: 60px; height: 70px; } .list_description { width: 60%; dl { margin: 0; } dt { color: #244; font-weight: bold; font-size: larger; } dd { margin: 0; } } .list_actions { font-size: x-small; text-align: right; padding-left: 1em; } .list_line_even { background: #e0f8f8; } .list_line_odd { background: #f8b0f8; } }
The file in the
/depot/app/views/layouts/application.html.erb
directory ( here it is ) I changed the fourth line from the end (from<body>
to what is available now).
localhost:3000/products
, then send the contents of the fileapp/views/products/index.html.erb
. - installero