rails structuring routes/controller/views for nested resources
问题 I have rails app with the following structure: user has_many posts post has_many post_comments post_comment has_many comment_replies I'm planning to use the following routes to avoid deep nesting. resources :posts do resources :post_comments, module: :posts end resources :comments do resources :comment_replies, module: :post_comments #is this module a good choice? end This gives the following controller structure post_comments GET /posts/:post_id/comments(.:format) posts/comments#index POST