I am hitting a problem where it seems that URL ":conditions=>" correctly affect URL recognition, but don't affect URL generation.
Basically I have two very similar websites which differ slightly in how they are laid out, but have substantially similar code. I want to use a bit of routing magic to use a single codebase for both sites. Note: I use the request_routing plugin to get access to the URL as a condition
eg:
map.with_options( :conditions => { :domain => /(^|\.)blog\./ } ) do
blog>
... end map.with_options( :conditions => { :domain => /(^|\.)track\./ } ) do
track>
... end
What happens is that at the "track" site the URLs work correctly if I type them in manually to the browser, ie they get recognised correctly, but new URLs are all generated in the scheme for the "blog" site (because it comes higher up in routing order - if I reverse the routes then the reverse situation occurs)
How can I get my :conditions to take effect during URL generation as well as recognition. Examining action_controller/routing.rb isn't trivial...
Suggestions please...
Ed W