routes.rb
我知道我可以通过这种方式在 Rails 3中指定嵌套资源:
resources :users do
resources :posts
end
但是,我想添加comments
到posts
. 我应该在我的routes.rb
文件中写什么?这是正确的方法吗?我可以继续嵌套它们吗?
resources :users do
resources :posts do
resources :comments
end
end