Module: PageHelper
- Defined in:
- lib/generators/pages/templates/page_helper.rb
Instance Method Summary collapse
- #meta_desc(desc) ⇒ Object
- #meta_keywords(desc) ⇒ Object
- #nav_link(page) ⇒ Object
- #page_name(name) ⇒ Object
- #sidebar(content) ⇒ Object
- #title(page_title) ⇒ Object
Instance Method Details
#meta_desc(desc) ⇒ Object
10 11 12 |
# File 'lib/generators/pages/templates/page_helper.rb', line 10 def (desc) content_for(:meta_desc) { desc.to_s } end |
#meta_keywords(desc) ⇒ Object
14 15 16 |
# File 'lib/generators/pages/templates/page_helper.rb', line 14 def (desc) content_for(:meta_keywords) { desc.to_s } end |
#nav_link(page) ⇒ Object
22 23 24 |
# File 'lib/generators/pages/templates/page_helper.rb', line 22 def nav_link(page) link_to page.titleize, page_path(page.downcase), :id => page end |
#page_name(name) ⇒ Object
6 7 8 |
# File 'lib/generators/pages/templates/page_helper.rb', line 6 def page_name(name) content_for(:page_name) { name.to_s } end |
#sidebar(content) ⇒ Object
18 19 20 |
# File 'lib/generators/pages/templates/page_helper.rb', line 18 def (content) content_for(:sidebar) { content.to_s } end |
#title(page_title) ⇒ Object
2 3 4 |
# File 'lib/generators/pages/templates/page_helper.rb', line 2 def title(page_title) content_for(:title) { page_title.to_s + " | Application Name" } end |