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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:55:45+00:00 2026-06-01T21:55:45+00:00

In routes.rb I have set up match member/:permalink => accounts#profile when the user’s url

  • 0

In routes.rb I have set up

match “member/:permalink” => “accounts#profile”

when the user’s url name is john-green, john_green, johngreen, everything is working fine, but when the url name is john.green, so as the permalink is taken just the first part – john
Specifically, from the Rails debug window:

Request

Parameters:

{"permalink"=>"john",
 "format"=>"green"}

Why is not accepted the . (dot) in the permalink? Exist any feature for using that?
EDIT when I use

  match "member/:permalink" => "accounts#profile", 
        :requirements       => { :permalink => /.+/ }

I get

{"requirements"=>{"permalink"=>/.+/},
 "permalink"=>"john",
 "format"=>"green"}
  • 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-01T21:55:47+00:00Added an answer on June 1, 2026 at 9:55 pm

    By default Rails treats everything after the dot as a format and looks like there’s no easy way of overriding this behavior. But there’s a bit dirty workaround that uses :requirements option:

    match 'member/:permalink' => 'accounts#profile', 
          :constraints        => { :permalink => /.+/ }
    

    By adding greedy regexp for the :permalink parameter you make Rails pass everything it finds after the member/ substring in the path into params[:permalink].

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

Sidebar

Related Questions

I have routes set up that look like: match '/things/:thing_id' => descriptions#index, :as =>
I have a hairy set of routes that I'm upgrading from Rails 2 to
In my routes I have: resources :accounts This produces: accounts GET /accounts(.:format) accounts#index POST
I have set up my routes so I can search all posts with: /posts/search/foobar
In Rails 3 edge, I have set up two nested resources like this: config/routes.rb
I have this set of routes: routes.MapRoute( IssueType, issue/{type}, new { controller = Issue,
I have set up a controller called links, i have the routes to several
I have a rails route set up like: match ':controller/:id/:action' # match 'teams/:id' =>
I'd like to have routes set up as follows: xyz/ maps to one action
I have the following routes set up in my webapi.. //Route for getting the

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.