Created
April 19, 2013 15:26
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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