Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link generation in Snow Leopard #1

Open
mihar opened this issue Sep 4, 2009 · 6 comments
Open

Link generation in Snow Leopard #1

mihar opened this issue Sep 4, 2009 · 6 comments

Comments

@mihar
Copy link

mihar commented Sep 4, 2009

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
Copy link

twalpole commented Sep 4, 2009

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
Copy link
Author

mihar commented Sep 4, 2009

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
Copy link
Contributor

etaque commented Sep 6, 2009

Same problem with 0.4, thanks for the workaround.

@mikelarkin
Copy link

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

@twalpole
Copy link

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
Copy link
Contributor

ryland commented Sep 13, 2009

@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.

mbleigh pushed a commit that referenced this issue Mar 6, 2012
Fix with including Rails.application.routes.url_helpers and building relative paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants