Skip to content

Instantly share code, notes, and snippets.

@HatemMahmoud
Created March 22, 2010 17:03
Show Gist options
  • Save HatemMahmoud/340272 to your computer and use it in GitHub Desktop.
Save HatemMahmoud/340272 to your computer and use it in GitHub Desktop.
A simple way to customize page titles in Rails views
<!-- in views/products/index.html.erb -->
<% @title = "Catalog" %>
<!-- in application.rhtml.erb -->
<title><%= @title.titleize + ' - My Great Store' %></title>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment