Sha256: 0cb647a9bc32b87c3a3cba943a6a9a23a63dfc4dec94852313cb9c0af210974f
Contents?: true
Size: 602 Bytes
Versions: 8
Compression:
Stored size: 602 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.where(:title => $1).first).present? self.url_for(page.url) else nil end rescue nil end end end end end end
Version data entries
8 entries across 8 versions & 2 rubygems