Sha256: ff6e6d96a13fba6f757488e1c5fc848d1b8634a0e546c00a6c22e5dd87e50d10
Contents?: true
Size: 319 Bytes
Versions: 2
Compression:
Stored size: 319 Bytes
Contents
module Petrie module PagesHelper def ancestor @ancestor ||= @page.top_ancestor end def children @children ||= ancestor.children end def page_path(page) page.self_and_ancestors.collect { |a| a.slug unless a.slug == 'home' }.unshift('').join('/') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
petrie-0.1.1 | app/helpers/petrie/pages_helper.rb |
petrie-0.1.0 | app/helpers/petrie/pages_helper.rb |