Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Rails 3 Page Title Breadcrumb
module ApplicationHelper
def build_page_title(*crumbs)
crumbs.map(&:to_s).reject(&:empty?).join(' - ')
end
end
<!DOCTYPE html>
<html>
<head>
<title><%= build_page_title 'Hello', 'Awesome', 'World' %></title>
</head>
<body>
<%= yield %>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.