# Routing.rb help please

**URL:** <https://www.ruby-forum.com/t/routing-rb-help-please/148963>\
**Category:** Rails\
**Created:** [September 18, 2008, 7:02pm UTC](https://www.ruby-forum.com/t/routing-rb-help-please/148963 "2008-09-18T19:02:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spokra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@spokra](https://www.ruby-forum.com/u/spokra)\
**Post date:** [September 18, 2008, 7:02pm UTC](https://www.ruby-forum.com/t/routing-rb-help-please/148963/1 "2008-09-18T19:02:37Z")

</div>

I have the following URL the dist lat lng all can have a decimal  
point in them… I saw a really old post that suggested to use the  
map with a requirements list like in the rout statement. Well it  
doesn;t parse it correctly… anyone care to correct the regex?  
this script returns a json object so google maps can put entries on  
the map…

[http://www.domain.com/search/1/5.2/47.5678/-122.006/](http://www.domain.com/search/1/5.2/47.5678/-122.006/)

map.search ‘/search/:type/:dist/:lat/:lng’, :controller =\>  
‘search’, :action =\> ‘search’,  
:requirements =\> { :lat  
=\> /._/ ,:lng =\> /._/,:dist =\> /.\*/ }
