module NavigationHelpers def path_to(page_name) case page_name when /the sign up page/i sign_up_path when /the sign in page/i sign_in_path when /the password reset request page/i new_password_path when /the home ?page/i root_path # Add more page name => path mappings here else raise "Can't find mapping from \"#{page_name}\" to a path." end end end World(NavigationHelpers)