Skip to content

Instantly share code, notes, and snippets.

@evanpurkhiser
Created March 31, 2013 19:08
Show Gist options
  • Save evanpurkhiser/5281633 to your computer and use it in GitHub Desktop.
Save evanpurkhiser/5281633 to your computer and use it in GitHub Desktop.
# Set the page title.
#
# It's possible to have the application name added to the title on either side
# of the passed page title by passing the options :left, :right, or :none. You
# can also set the delmiter for the title
#
# Returns String
def self.page_title(title, with_name = :left, delimiter = '-')
title = [Clocker::NAME, title].join(" #{delimiter} ") if with_name == :left
title = [titlem Clocker::NAME].join(" #{delimiter} ") if with_name == :right
self.title = title
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment