# Routing Fixnum

**URL:** <https://www.ruby-forum.com/t/routing-fixnum/94791>\
**Category:** Rails\
**Created:** [November 13, 2005, 4:49am UTC](https://www.ruby-forum.com/t/routing-fixnum/94791 "2005-11-13T04:49:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/898d66/32.png) [@eric](https://www.ruby-forum.com/u/eric)\
**Post date:** [November 13, 2005, 4:49am UTC](https://www.ruby-forum.com/t/routing-fixnum/94791/1 "2005-11-13T04:49:55Z")

</div>

If I have the following route defined:

map.connect ‘/foo/bar/:baz’,  
:requirements =\> {:baz =\> /^\d+$/}

then if someone asks for /foo/bar/3 I noticed that :baz == “3” instead  
of :baz == 3. I.E. it is a string not a number. (At least it does this  
in the functional testing of the routing). This seems reasonable because  
I have not told it to expect a number but it would be nice if there was  
a way I could specify that. Didn’t see anything in the documentation.

Anything I missed or should I just params[:baz].to\_i in my controller?

Eric
