defpath_to(page_name)casepage_namewhen/the list of blog posts/refinery_admin_blog_posts_pathwhen/the new blog posts? form/new_refinery_admin_blog_post_pathelsebeginifpage_name=~/the blog post titled "?([^\"]*)"?/and(page=BlogPost.find_by_title($1)).present?self.url_for(page.url)elsenilendrescuenilendendend