Method: Lookbook::PageHelper#page_path
- Defined in:
- lib/lookbook/helpers/page_helper.rb
#page_path(id) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the URL path to a page.
10 11 12 13 14 15 16 17 |
# File 'lib/lookbook/helpers/page_helper.rb', line 10 def page_path(id) page = id.is_a?(PageEntity) ? id : Engine.pages.find_by_id(id) if page.present? page.docs_path else Lookbook.logger.warn "Could not find page with id ':#{id}'" end end |