Rails: Routing subdomain to a resource

前端 未结 4 1285
野的像风
野的像风 2021-02-06 06:28

Is it possible to map a subdomain to a resource? I have a company model. Currently, using subdomain_fu, my routing file contains:

map.company_root  \'\', :cont         


        
4条回答
  •  不要未来只要你来
    2021-02-06 07:02

    Here's a complete example implementation of Rails 3 subdomains with authentication (along with a detailed tutorial). It's much easier to do this in Rails 3 than in Rails 2 (no plugin required).

提交回复
热议问题