Skip to content

Instantly share code, notes, and snippets.

@TXDynamics
Created April 19, 2013 15:26
Show Gist options
  • Save TXDynamics/5421084 to your computer and use it in GitHub Desktop.
Save TXDynamics/5421084 to your computer and use it in GitHub Desktop.
Ruby Code for a Dynamic Title with a Local Parameter of :title in application_helper
def full_title(page_title)
base_title = "Ruby on Rails Tutorial Sample App"
if page_title.empty?
base_title
else
"#{base_title} | #{page_title}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment