Bike!Bike! Website!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
384 B

module NavigationHelpers
def path_to(page_name)
case page_name
when /^landing$/i
path = 'root'
end
begin
self.send((path + '_url').to_sym)
rescue Object => e
raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
"#{path}_url\n" +
"Now, go and add a mapping in #{__FILE__}"
end
end
end
World(NavigationHelpers)