Skip to content

Instantly share code, notes, and snippets.

@krainboltgreene
Created February 23, 2011 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krainboltgreene/840614 to your computer and use it in GitHub Desktop.
Save krainboltgreene/840614 to your computer and use it in GitHub Desktop.
module ApplicationHelper
def keywords
# List of keywords relevent to SEO.
keywords = ['magic the gathering','deck building']
# Join the keywords so they're in a string.
keywords.join(', ')
end
# Method for printing the page title.
def title
# The base page title.
base = "DeckTap"
# Check to see if title is nil.
if @title.nil?
# If the title is nil, then just show the base.
base
else
# However if the title isn't nil, show base + title.
base + " | " + @title
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment