4. class PagesController < ApplicationController
def about
@title = quot;About usquot;
end
end
<head>
<title>
Foo.com<% if @title %>: <%= @title %><% end %>
</title>
</head>
5. class PagesController < ApplicationController
def about
@title = quot;About usquot;
end
end
<head>
<title>
Foo.com<% if @title %>: <%= @title %><% end %>
</title>
</head>
<head>
<title>
Foo.com: About us
</title>
</head>
6. class PagesController < ApplicationController
def about
@title = quot;About usquot;
end
def contact
@title = quot;Contact usquot;
end
def faq
@title = quot;Frequently asked questionsquot;
end
def press
@title = quot;Press centerquot;
end
end
7. class PagesController < ApplicationController
def about
@title = quot;About usquot;
end
def contact
@title = quot;Contact usquot;
BAD
end
def faq
@title = quot;Frequently asked questionsquot;
end
def press
@title = quot;Press centerquot;
end
end