views:

42

answers:

1

I am looking to create a rails route that is capable of accepting requests using a regular expression. Specifically, I need optional paths. As an example:

"(/first)?(/second)?"

Would match:

/first
/second
/first/second

But not:

/second/first

Is this possible? Thanks.

A: 

Updated to Rails 3 (now correctly supports REGEX routes).

Kevin Sylvestre