Tuesday, April 27, 2010

Checking requirements in Routes

Here by i have checked routes for domain_name with alpha-numeric.

map.home '/homes/:domain_name/:id',:controller=>'home', :action=>'new', :requirements => { :domain_name => /[A-Za-z0-9.]+/}

No comments: