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 7620709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:00:11+00:00 2026-05-31T04:00:11+00:00

For example, http://www.quora.com/Is-getting-ripped-worth-it As you can see, the URL for a question does not

  • 0

For example,

http://www.quora.com/Is-getting-ripped-worth-it

As you can see, the URL for a question does not have a controller’s name. It is associated with the root URL. How can I do this?

In routes.rb, I tried the following:

match '/:id' => "questions#show"

That works, but new_question or edit_question paths still generate /questions/new(.:format) and /questions/:id/edit(.:format) as URLs.

Are there any elegant solutions for this problem?

  • 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-31T04:00:13+00:00Added an answer on May 31, 2026 at 4:00 am

    There is nothing that prevents you from doing this:

    match '/new' => "questions#new", :as => 'new_question'
    match '/:id/edit' => "questions#edit", :as => 'edit_question'
    

    but you’ll have to remove :resources questions

    One elegant solution is to use the friendly_id gem: https://github.com/norman/friendly_id

    You can find similar ones at slugs”>http://www.ruby-toolbox.com/categories/rails_permalinks_slugs

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

Sidebar

Related Questions

Let's say I have a url such as: http://www.example.com/hello.png?w=100&h=100&bg=white What I'd like to do
I have some URL that contains special characters. For example: http://www.example.com/bléèàû.html If you type
example: http://www.ehow.com/how_2196172_ping-mac-computer.html As you can see the helpful? element is stuck in place even
I have tried this example http://www.bennadel.com/blog/1056-ColdFusion-CFPOP-My-First-Look.htm , but it retrieve emails from POP server.
I'm following this example: http://www.codinghorror.com/blog/2005/12/getting-started-with-indexing-service.html However, the conversion to dataset shows empty columns for
Hi All I have followed the following example http://www.google.com/codesearch#search/&q=NumberFormattingTextWatcher&exact_package=android&type=cs I have CurrencyTextWatcher as a
I need a certain part of a URL extracted. Example: http://www.domain.com/blog/entry-title/?standalone=1 is the given
I have a RSS feed generated by my server ( for example : http://www.seek-team.com/en/teams/counter-strike-source/feed/
I'm working through an HTML5 drag and drop example http://www.sitepoint.com/html5-file-drag-and-drop/ , but can't figure
I am trying to implement this example http://www.javacodegeeks.com/2011/02/android-google-maps-tutorial.html and i have followed exactly all

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.