开发者

Regular Expression Routes in Rails

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)?开发者_如何学Go(/second)?"

Would match:

/first

/second

/first/second

But not:

/second/first

Is this possible? Thanks.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜