Find the errors in the Library Example.
--------- /app/views/info/staff.html.erb --------
<p>Meet the staff:
<table>
<tr>
<td>Head Librarian</td>
<td>Frieda Farus</th>
<td><%= image_tag 'frieda.jpg", :class => img %>
<tr>
<td>Reference Librarian</td>
<td>Lotus Gergenson</td>
<td><% imagetag 'lotus.jpg', :class => 'img' %>
</tr>
Corrected version of /app/views/info/staff.html.erb --------
<p>Meet the staff:</p>
<table>
<tr>
<td>Head Librarian</td>
<td>Frieda Farus</td>
<td><%= image_tag 'frieda.jpg', :class => 'img' %>
</tr>
<tr>
<td>Reference Librarian</td>
<td>Lotus Gergenson</td>
<td><%= image_tag 'lotus.jpg', :class => 'img' %></td>
</tr>
</table>
--------- /app/views/layouts/application.html.erb --------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><%= @title %></title>
<h1><%= @title %></h1>
<body>
</head>
<%= stylesheet-link-tag 'library' %>
<table>
<tr>
<td><%= link_to 'Index Page',
{ :action => 'index' } %></td>
<td><%= link_to 'Staff Listings Page'
{ :action => 'staff' %></td>
<td><%= link_to 'Policies Page',
{ :action -> 'policies' } %></td>
</tr>
</table>
<hr />
</body/>
Corrected version of /app/views/layouts/application.html.erb --------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><%= @title %></title>
<%= stylesheet_link_tag 'library' %>
</head>
<body>
<h1><%= @title %></h1>
<table>
<tr>
<td><%= link_to 'Index Page',
{ :action => 'index' } %></td>
<td><%= link_to 'Staff Listings Page',
{ :action => 'staff' %></td>
<td><%= link_to 'Policies Page',
{ :action => 'policies' } %></td>
</tr>
</table>
<hr />
</body>
</html>
--------- /app/views/controllers/show_info_controller.rb --------
class Info Controller > ApplicationController
def index
title = Index Page
def staff
title = Staff Listing Page
def policies
title = Policies Page
def page1
title = Page 1
end
Corrected version of /app/views/controllers/show_info_controller.rb
class Info Controller < ApplicationController
def index
@title = 'Index Page'
end
def staff
@title = 'Staff Listing Page'
end
def policies
@title = 'Policies Page'
end
def page1
@title = 'Page 1'
end
end
--------- /public/stylesheets/styles.css --------
body, td { font-family: Trebuchet MS
color: navy
background-color: silver; }
h1 { fontSize; 200%; }
img. { width: 1.25; height: 1.5; }
td { padding: 0.15in; }
Corrected version: of /public/stylesheets/styles.css --------
body, td { font-family: Trebuchet MS;
color: navy;
background-color: silver; }
h1 { font-size: 200%; }
.img { width: 1.25in; height: 1.5in; }
td { padding: 0.15in; }