using it in a view:
<%= link_to city.name, city_root_path(:subdomain => city.subdomain)%>
that works well, now I can't figure out how to generate a nested route
with subdomain,
i.e. miami.site.com/users/1
trying any combination of the form user_path(@user,:subdomain =>
city.subdomain) does nothing excepnt append a parameter at the end of
the url like this:
I wrote that because of a recent site I built with 18 subdomains and not wanting to write out all those links by hand.
In your case above you could define a to_params method on User to return the hash (including the subdomain) and then just do user_path(@user) and it will do the right thing.