Sha256: 2235f06fa9e61e7d1ef259c5a2bc51014624989d05c940f77e0be544dac87869
Contents?: true
Size: 451 Bytes
Versions: 60
Compression:
Stored size: 451 Bytes
Contents
module NavigationHelpers def path_to(page_name) case page_name when "the new album page" '/albums/new' when /^the page for album "(.+)"$/ album_path(Album.find_by_name($1)) when /^the image for text "(.+)", size "(.+)"$/ "/text/#{$1}/#{$2}" else raise "Can't find mapping from \"#{page_name}\" to a path.\n" + "Now, go and add a mapping in #{__FILE__}" end end end World(NavigationHelpers)
Version data entries
60 entries across 60 versions & 3 rubygems