I have the same problem and I am able to work very well with my URL helper. Basically, I have something like this:
def base_url "http://" + @actual_subdomain + "/" end
And all the other helpers, I wrote a map to this. For instance:
def category_url category base_url + category.slug end
source share