Sha256: 473a98d9a7382b4a26e8bce84a3cb22800e9af9afe77b43412097696c56721bf
Contents?: true
Size: 595 Bytes
Versions: 22
Compression:
Stored size: 595 Bytes
Contents
module NavigationHelpers module Refinery module Pages def path_to(page_name) case page_name when /the home\s?page/ root_path when /the list of pages/ admin_pages_path when /the new page form/ new_admin_page_path else begin if page_name =~ /the page titled "?([^\"]*)"?/ and (page = Page.by_title($1).first).present? self.url_for(page.url) else nil end rescue nil end end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems