I am having routes like below to delete/list an user.
map.connect 'developer/:user_name/delete',:controller=>"developers",:action=>"delete",:method=>:delete
map.connect 'developer/:user_name/list',:controller=>"developers",:action=>"list",:method=>:get
While listing the user by encoding the Dot with %2E, i can see the success response
http://localhost:3000/developer/testuser%2Ehu/list
But While trying to delete the user who containing the Dot(.), throws 404 error.
http://localhost:3000/developer/testuser%2Ehu/delete, how to fix this issue.
The dot is not allowed by default in Rails routing because the dot is considered the extension of the page. You should avoid using dots in URLs.
However, in your case you can instruct Rails to consider the dot for the
:user_nameparameter passing a regular expression.PS. Because of
map.connect, you are using a very old version of Rails (Rails < 3). You should upgrade your application.