Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6473047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:25:09+00:00 2026-05-25T06:25:09+00:00

here is my config/routes.rb : Eesoudayo::Application.routes.draw do resources :articles do resources :comments end end

  • 0

here is my config/routes.rb:

Eesoudayo::Application.routes.draw do
  resources :articles do
    resources :comments
  end
end

…which, as you can imagine, generates the following routes:

    article_comments GET    /articles/:article_id/comments(.:format)          {:action=>"index", :controller=>"comments"}
                     POST   /articles/:article_id/comments(.:format)          {:action=>"create", :controller=>"comments"}
 new_article_comment GET    /articles/:article_id/comments/new(.:format)      {:action=>"new", :controller=>"comments"}
edit_article_comment GET    /articles/:article_id/comments/:id/edit(.:format) {:action=>"edit", :controller=>"comments"}
     article_comment GET    /articles/:article_id/comments/:id(.:format)      {:action=>"show", :controller=>"comments"}
                     PUT    /articles/:article_id/comments/:id(.:format)      {:action=>"update", :controller=>"comments"}
                     DELETE /articles/:article_id/comments/:id(.:format)      {:action=>"destroy", :controller=>"comments"}
            articles GET    /articles(.:format)                               {:action=>"index", :controller=>"articles"}
                     POST   /articles(.:format)                               {:action=>"create", :controller=>"articles"}
         new_article GET    /articles/new(.:format)                           {:action=>"new", :controller=>"articles"}
        edit_article GET    /articles/:id/edit(.:format)                      {:action=>"edit", :controller=>"articles"}
             article GET    /articles/:id(.:format)                           {:action=>"show", :controller=>"articles"}
                     PUT    /articles/:id(.:format)                           {:action=>"update", :controller=>"articles"}
                     DELETE /articles/:id(.:format)                           {:action=>"destroy", :controller=>"articles"}

My question is: is there a sexy way to clean a little bit them, giving this result?

    article_comments GET    /:article_id/(.:format)         {:action=>"index", :controller=>"comments"}
                     POST   /:article_id/(.:format)         {:action=>"create", :controller=>"comments"}
 new_article_comment GET    /:article_id/new(.:format)      {:action=>"new", :controller=>"comments"}
edit_article_comment GET    /:article_id/:id/edit(.:format) {:action=>"edit", :controller=>"comments"}
     article_comment GET    /:article_id/:id(.:format)      {:action=>"show", :controller=>"comments"}
                     PUT    /:article_id/:id(.:format)      {:action=>"update", :controller=>"comments"}
                     DELETE /:article_id/:id(.:format)      {:action=>"destroy", :controller=>"comments"}
            articles GET    /.:format)                      {:action=>"index", :controller=>"articles"}
                     POST   /.:format)                      {:action=>"create", :controller=>"articles"}
         new_article GET    /new(.:format)                  {:action=>"new", :controller=>"articles"}
        edit_article GET    /:id/edit(.:format)             {:action=>"edit", :controller=>"articles"}
             article GET    /:id(.:format)                  {:action=>"show", :controller=>"articles"}
                     PUT    /:id(.:format)                  {:action=>"update", :controller=>"articles"}
                     DELETE /:id(.:format)                  {:action=>"destroy", :controller=>"articles"}

PS: I’m working with Rails 3.x <3

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:25:10+00:00Added an answer on May 25, 2026 at 6:25 am

    I don’t really know if this works, a shot in the dark really:

    Eesoudayo::Application.routes.draw do
      resources :articles, :path => "/" do
        resources :comments, :path => "/"
      end
    end
    

    I have only tested this using rake routes, it may very well be that everything will explode when you try to launch your server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following routes in my 3.1.0.rc5 app # config/routes.rb devise_for :users resources
Here is part of my web.xml: <context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath:application-config.xml </param-value> </context-param> application-config.xml uses
In the rails config/routes.rb file, how do I ensure that the first route here
I have deleted public/index.html. Here is my config/routes.rb Those all I have in that
Can someone offer troubleshooting tips here?: With the following sequence of rails related commands:
Here is the config from shiro.ini shiro.loginUrl = /login.jsp ######### URL CONFIG ################### [urls]
I'm trying to install ibrowser for tinymce. Here's the config file: $cfg['ilibs'] = array
I'm using the ASP.Net SqlMembershipProvider to manage my users. Here is my config: <membership
Here is the web.config; <?xml version=1.0 encoding=UTF-8?> <configuration> <system.web> <customErrors mode=Off> </customErrors> <authentication mode=Forms>
Here is my (censored) config/deploy.rb: https://gist.github.com/eedf6c976f632c1242cf For some reason, any changes to my assets,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.