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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:55:48+00:00 2026-06-14T05:55:48+00:00

I defined a custom route: match ‘folio/:id’ => ‘posts#show’, :as => :folio, :via =>

  • 0

I defined a custom route:

match 'folio/:id' => 'posts#show', :as => :folio, :via => :get

When I run rake routes command I have:

post  GET    /posts/:id(.:format)     posts#show
folio GET    /folio/:id(.:format)     posts#show

And I put link for this element in my other page: link_to post.title, folio_path ,but when I enter it throws me an routing error:

No route matches {:controller=>"post", :action=>"show"}

Why it fails? When I’m using post#show in normal way it works like a charm, but with my custom route it fails – please help!

  • 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-06-14T05:55:49+00:00Added an answer on June 14, 2026 at 5:55 am

    You need to specify the post so rails can fill the id part:

    link_to post.title, folio_path(post)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my routes.rb I have a custom path defined: match foo/copy => foo#copy, :via
I have this custom route in my routes.rb match '/businesses/:permalink', :to => 'businesses#show', :as
I have two routes defined thus: //Custom route for legacy admin page routes.MapPageRoute( LocaliseRoute,
I have a custom route defined: routes.MapRoute( FabricDetails, // Route name fabric/details/{designerUrlFriendlyName}/{collectionUrlFriendlyName}/{fabricUrlFriendlyName}, // URL
I have defined custom shortcut in General -> Key dialog for Show Whitespace character.
I have a fairly simple Rails 3 project where I've defined a custom route:
I have a problem using my url view helper. I have defined custom routes
Most of the routes I use are based on the default route defined in
Using Play 2.0.1 I defined the following route: GET /demo/list controllers.Demos.listDemos(page: Int ?= 0,
I have defined 2 custom routes. One for threads/:id/:name and the other for threads/tags/:tagName

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.