hi,
enjoyed playing with routes.rb - but hit a problem i could not solve.
would be nice, if anybody could have a look at this.
i would like to create pretty urls which reflect a
hierarchical structure of cascaded ''topics'' of invinite depth.
say: /main/foo/bar/baz/top
foo/bar/baz is the part of the url which grows dependent on the
position.
my routes.rb looks like:
...
map.connect ''/:main/:middle/:xtop'', :controller =>
''start''
:action => ''topic_view'',
:main => :main,
:xtop => :xtop
...
i setup links like this:
<%= link_to(topic.name, url_for(:main => topic.path.start_topic.name,
:xtop => topic.path.end_topic.name,
:middle => topic.path.middle) ) %>
whereas :middle = ''foo/bar/baz''
everythin works fine, - except the ''middle'' part in the url
gets
url-encoded (%2F), which disturbs..
http://localhost/topic/subtopic%2Fsubsub%2Fsubsubsub/endtopic
so, how to prevent this url-encoding?
greetings
rene