Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# place this in application_helper.rb
def set_page_title(title = nil, &block)
if block_given?
html = capture(&block)
concat(html)
end
@page_title = title || strip_tags(html)
end
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.