How to force Rails to consider a param with a dot in the value like google.com (e.g. /some_action/google.com) a single param and not \"id\" =
We had similar case when we removed some part of an api path. Basically we went from /api/app/v1/* to /api/v1/*
We put this in our routes
match '/api/app/v1/*path', to: redirect(path: '/api/v1/%{path}'), via: :all
This was all fine except for some routes that ended with path params including dots. E.g. /api/v1/foo/00.00.100 where .100 got parsed into format and the remaining param only had the value 00.00
We guarded this with some constraint on the params.
put '/api/app/v1/foo/:version',
constraints: { version: /([0-9]+)\.([0-9]+)\.([0-9]+)/ },
to: redirect('/api/v1/foo/%{version}')
Edit: we use rails 5