svenfuchs / routing-filter

routing-filter wraps around the complex beast that the Rails routing system is, allowing for unseen flexibility and power in Rails URL recognition and generation.
http://www.artweb-design.de
MIT License
464 stars 84 forks source link

Filter also on subdomains #35

Closed HoneyryderChuck closed 12 years ago

HoneyryderChuck commented 12 years ago

Hi there,

I'm currently using your plugin in order to filter the subdomain and add it as a param value, which is kind of important in my case. The thing is, since only the path is being passed to the around_recognize filter, along with the env from the request, i have to parse the env Host myself in order to get get the subdomain, which is something that the request object already does. It would be kind of good to either get the whole request on the filter, or, if heavy, get the domain, subdomain, scheme, port, all of that. Lets say, i wanted to filter the language as a subdomain.

Is it so, or am i missing something?

Regards, Tiago

mjonuschat commented 12 years ago

As you correctly noted RoutingFilter only works on the path part of the request. Since Rails makes the request object available in the router itself as well es in the controllers I am wondering what you are accomplishing/trying to accomplish with routing-filter that couldn't be done within the rails router or controllers.

HoneyryderChuck commented 12 years ago

Sorry, I've already worked the issue around, exactly by using the router properties, and forgot to close the issue. Thx for the answer though.