Get subdomain from action controller

Hi all,

Is it possible to get the subdomain of the request from the action
controller? If so, how do we get the subdomain from Rails action
controller? I tried to look at the Rails guide about this but can not
find any information on this.

Thank you very much in advance for your help and assistance.

Kind regards,
Joshua


http://twitter.com/scrum8

Just use subdomain_fu plugin GitHub - mbleigh/subdomain-fu: A new plugin approach to attempting to solve the usage of subdomains in linking and routing in Rails projects.
http://github.com/mbleigh/subdomain-fuYou’ll get ‘current_subdomain’
method to use in controllers

Thanks Vladimir,

I will look into subdomain_fu tonight.

Kind regards,
Joshua


http://twitter.com/scrum8