# Singular resources namespaced by its slug (Routing)

**URL:** <https://www.ruby-forum.com/t/singular-resources-namespaced-by-its-slug-routing/193308>\
**Category:** Rails\
**Created:** [August 15, 2010, 1:49pm UTC](https://www.ruby-forum.com/t/singular-resources-namespaced-by-its-slug-routing/193308 "2010-08-15T13:49:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![judge](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de0a6/32.png) [@judge](https://www.ruby-forum.com/u/judge)\
**Post date:** [August 15, 2010, 1:49pm UTC](https://www.ruby-forum.com/t/singular-resources-namespaced-by-its-slug-routing/193308/1 "2010-08-15T13:49:31Z")

</div>

Hi,

I have the followed Rails 3 routes:

```
Hello::Application.routes.draw do
  resources :blogs do
    resources :articles do
      resources :comments
    end
  end
end

```

By raking them, we can find (for instance):

```
GET /blogs/:blog_id/articles(.:format) {:action=>"index",

```

:controller=\>“articles”}

Because every routes begin with the same root path (_/blogs_), I would  
like to shorten addresses by removing it (when :blog\_id is given).

In this why, I could have thoses routes (I think it’s more DRY):

```
GET /:blog_id/articles(.:format) {:action=>"index",

```

:controller=\>“articles”}

According to you, what kind of change I should make over my current  
routes configuration?

Thanks.
