Rails 3 better routing

谁说胖子不能爱 提交于 2019-12-25 04:31:30

问题


Out of curiosity. In the docs of rails3 they say that as rule of thumb, I shouldn't nest more than one level of resources. Is there any better way to do that then?

  scope "(:locale)", :locale => /pl/ do

    resources :users  

    namespace "admin" do
      resources :universities do
        resources :faculties
      end
    end
  end 

回答1:


Why? You're not nesting more than one level of resources :-)



来源:https://stackoverflow.com/questions/4679699/rails-3-better-routing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!