Allowing dots in Rails routes
One of the lesser known thing about how Rails matches the route segments with incoming requests.The default regular expression used for a route segment is /[^\/.?] /. It matches any combination of characters that is not a forward slash, dot or question mark.Because of this, when we hit users/john.smith/upgrade, it is matched with following regular expression by Rails.
Allowing dots in Rails routes #ruby #rubydeveloper #rubyonrails https://rubyonrails.ba/single/allowing-dots-in-rails-routes