Sha256: 3eed48ba7cb6138e7d5003d0937e8a37bbc150494e9ddb04a65ba3020d8b27ca
Contents?: true
Size: 528 Bytes
Versions: 2
Compression:
Stored size: 528 Bytes
Contents
module ApplicationHelper attr_accessor :page_title # Set page title. Use this method in your views def title(page_title) @page_title = page_title end # This prints page title. Call this helper # inside title tag of your layout def page_title(default_title = '') @page_title || default_title end # Print heading (h1 by default) and set page title # at the same time. Use this method in your views def heading_with_title(heading, tag=:h1) title(heading) content_tag tag, heading end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
playmo-0.0.6 | lib/generators/playmo/templates/application_helper.rb |
playmo-0.0.5 | lib/generators/playmo/templates/application_helper.rb |