- map.connect "api/#{API_VERSION}/segment/:id/ways", :controller => 'way', :action => 'ways_for_segment'
- map.connect "api/#{API_VERSION}/segment/:id/history", :controller => 'old_segment', :action => 'history'
- map.connect "api/#{API_VERSION}/segment/:id", :controller => 'segment', :action => 'rest'
+ map.connect "api/#{API_VERSION}/segment/:id/ways", :controller => 'way', :action => 'ways_for_segment', :id => /\d+/
+ map.connect "api/#{API_VERSION}/segment/:id/history", :controller => 'old_segment', :action => 'history', :id => /\d+/
+ map.connect "api/#{API_VERSION}/segment/:id", :controller => 'segment', :action => 'rest', :id => /\d+/