我的网址是:
http://website.com/academies/1
http://website.com/academies/1/courses
http://website.com/academies/1/courses/1
http://website.com/academies/1/courses/1/lessons
http://website.com/academies/1/courses/1/lessons/1
但我想为每个学院使用它子域名
http://1.website.com/
http://1.website.com/courses/
http://1.website.com/courses/1
http://1.website.com/courses/1/lessons
http://1.website.com/courses/1/lessons/1
我想这样做,但不应该是强制性的。两个网址的签名应该同时有效
的routes.rb
resources :academies do
resources :users
resources :courses
resources :posts