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

current_domain includes port #19

Open ghazel opened 13 years ago

ghazel commented 13 years ago

current_domain returns "foo.com:3000" when the port is 3000 (not 80). For reference, request.domain returns "foo.com" so I think current_domain should be just the domain too. For my purposes (the domain attribute of a cookie) the port is not considered part of the domain name, and is not allowed to be included.

The request object also has request.host and request.host_with_port, so perhaps a new variable current_domain_with_port could be added if someone needs it.