mbleigh / subdomain-fu

A new plugin approach to attempting to solve the usage of subdomains in linking and routing in Rails projects.
http://rdoc.info/projects/mbleigh/subdomain-fu
Other
586 stars 118 forks source link

Link generation in Snow Leopard #1

Open mihar opened 15 years ago

mihar commented 15 years ago

Since i upgraded to Snow Leopard and reinstalled all the gems, rails doesn't generate proper URLs with the :subdomain option set. It ignores the subdomain option completely. The routing works correctly though.

twalpole commented 15 years ago

It looks like the 0.4 gem broke the concept of xxx_path(:subdomain=>'abc') returning a fully qualified domain if the subdomain option is passed and is not the same as current, since it stopped working when I upgraded to 0.4 and havent moved to SnowLeopard yet. A workaround is to use xxx_url(:subdomain=>'abc')

mihar commented 15 years ago

Yes you are correct, i also noticed it was the new version causing problems, when i downgraded the gem as a last resort.

I mistakenly thought it had something to do with Snow Leopard, because i updated all the gems after the upgrade.

etaque commented 15 years ago

Same problem with 0.4, thanks for the workaround.

mikelarkin commented 15 years ago

Same issue, still on Leopard, obviously an issue with the plugin.

twalpole commented 15 years ago

Actually, from looking over the code it appears there is a new setting. So I believe SubdomainFu.override_only_path=true should return the behavior to what it was before

ryland commented 15 years ago

@twalpole is correct. I believe the README just needs to be updated. By default :only_path will be honored. If you want the previous (and in my opinion misleading) behavior set SubdomainFu.override_only_path to true in your application configuration.