Rails Pretty URL with Decimals
- by Kevin Sylvestre
I have a rails application that allows searches using longitude and latitude. I have added a 'pretty' route with:
map.connect 'stores/near/:longitude/:latitude', :controller => 'stores', :action => 'index'
This works for integer latitude and longitude values (http://localhost:3000/stores/near/-88/49) but fails for decimal values (http://localhost:3000/stores/near/-88.341/49.123) giving:
Routing Error
No route matches "/stores/near/-88/49.0" with {:method=>:get}
Any ideas how to use pretty URLs in rails with decimals?