Skip to content

Instantly share code, notes, and snippets.

@benlangfeld
Created December 7, 2010 09:52
Show Gist options
  • Select an option

  • Save benlangfeld/731633 to your computer and use it in GitHub Desktop.

Select an option

Save benlangfeld/731633 to your computer and use it in GitHub Desktop.
module LayoutHelper
def title(page_title, show_title = true)
content_for(:title) { page_title.to_s }
@show_title = show_title
end
def show_title?
@show_title
end
def stylesheet(*args)
content_for(:head) { stylesheet_link_tag(*args) }
end
def javascript(*args)
content_for(:head) { javascript_include_tag(*args) }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment