Sha256: 403436190c0fd29a2e75db715067aed5e4240177c3527bf9d033ba4dfdd6ac26

Contents?: true

Size: 662 Bytes

Versions: 2

Compression:

Stored size: 662 Bytes

Contents

module PageHelper
  def title(page_title)
    content_for(:title) { page_title.to_s + " | Application Name" }
  end
  
  def page_name(name)
    content_for(:page_name) { name.to_s }
  end
  
  def meta_desc(desc)
    content_for(:meta_desc) { desc.to_s }
  end
  
  def meta_keywords(desc)
    content_for(:meta_keywords) { desc.to_s }
  end
  
  def sidebar(content)
    content_for(:sidebar) { content.to_s }
  end  
  
  def nav_link(page)
    # link_to page.titleize, page_path(page.downcase), :id => page
    if page.nav_path == ""
      link_to page.link, '#'
    else
      link_to page.link, link_path(page.root.name, page.nav_path)
    end
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sushifish-0.9.6 lib/generators/sushi/templates/page_helper.rb
sushifish-0.9.0 lib/generators/sushi/templates/page_helper.rb