---
title: "Discussion on \"Shallow vs Deep Nested Resources in Rails\" | Hashnode"
description: "Discussion on \"Shallow vs Deep Nested Resources in Rails\". In Rails, in order to create routes we’ve define resources. Resources provide a mapping between an http verb with its URL and a controller action. For eg. to create routes for posts we’ve to add following to our routes.rb:\n# routes.rb\nRails.applicati..."
url: "https://hashnode.com/posts/shallow-vs-deep-nested-resources-in-rails/6839a8d7be7b7bc979411a1c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Shallow vs Deep Nested Resources in Rails](https://codingwithaglassofmilk.hashnode.dev/shallow-vs-deep-nested-resources-in-rails?utm_source=hashnode&utm_medium=feed)

In Rails, in order to create routes we’ve define resources. Resources provide a mapping between an http verb with its URL and a controller action. For eg. to create routes for posts we’ve to add following to our routes.rb: # routes.rb Rails.applicati...

May 30, 2025 · 3 min read · codingwithaglassofmilk.hashnode.dev  
Read the article

-   [#ruby](https://hashnode.com/tag/ruby)
-   [#ruby-on-rails](https://hashnode.com/tag/ruby-on-rails)

## Written by

[Ashish Gaur](https://hashnode.com/@snyder91)

@snyder91

  
[View profile](https://hashnode.com/@snyder91)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
