@@ -7,25 +7,25 @@ module NavigationHelpers
77 #
88 def path_to ( page_name )
99 case page_name
10+ when /^the home\s ?page$/
11+ '/'
12+ when /^the content library$/
13+ cms_content_library_path
14+ # Add more mappings here.
15+ # Here is an example that pulls values out of the Regexp:
16+ #
17+ # when /^(.*)'s profile page$/i
18+ # user_profile_path(User.find_by_login($1))
1019
11- when /^the home\s ?page$/
12- '/'
13-
14- # Add more mappings here.
15- # Here is an example that pulls values out of the Regexp:
16- #
17- # when /^(.*)'s profile page$/i
18- # user_profile_path(User.find_by_login($1))
19-
20- else
21- begin
22- page_name =~ /^the (.*) page$/
23- path_components = $1. split ( /\s +/ )
24- self . send ( path_components . push ( 'path' ) . join ( '_' ) . to_sym )
25- rescue NoMethodError , ArgumentError
26- raise "Can't find mapping from \" #{ page_name } \" to a path.\n " +
27- "Now, go and add a mapping in #{ __FILE__ } "
28- end
20+ else
21+ begin
22+ page_name =~ /^the (.*) page$/
23+ path_components = $1. split ( /\s +/ )
24+ self . send ( path_components . push ( 'path' ) . join ( '_' ) . to_sym )
25+ rescue NoMethodError , ArgumentError
26+ raise "Can't find mapping from \" #{ page_name } \" to a path.\n " +
27+ "Now, go and add a mapping in #{ __FILE__ } "
28+ end
2929 end
3030 end
3131end
0 commit comments