Results 1 to 6 of 6
Jun 16, 2009, 14:56 #1
- Join Date
- Nov 2008
- 0 Post(s)
- 0 Thread(s)
Simply Rails 2 - Chapter 6 - Page 171 - Layout
I just bought Simply Rails 2.0 by Patrick Lenz and I'm following along.
Everything is going fine until it's time to create a layout and style sheet.
On page 169, it says:
Layouts should be stored in the app/views/layouts folder. A layout template can basically be given any name, as long as the file ends in .html.erb. If the filename is application.html.erb, Rails will adopt this as the default layout.
On page 170, it says:
<%= stylesheet_link_tag 'style' %>
This code generates the HTML that includes an external style sheet in the page. By passing the string style, we ensure that the <link> tag that's generated will point to the URL /stylesheets/style.css.
When I reload the page /stories/new the page looks exactly the same as before (like page 164)
I took a look at the source code and the following stylesheet is referenced: "/stylesheets/scaffold.css?1245114256" . I deleted this stylesheet hoping this would make a difference. Didn't make a difference.
The layout template and style are not being recognized by the web server. I come to this conclusion because the "shovell" heading doesn't display.
My guess is the real problem is the layout template not being recognized. But I have no clue how to "fix" this problem.