Sha256: b2ea7fbd00050d461bfb0f281cdac4266891b63c769fbf5ecb0254cd8abffc07
Contents?: true
Size: 594 Bytes
Versions: 4
Compression:
Stored size: 594 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.find_by_title($1)).present? self.url_for(page.url) else nil end rescue nil end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems