[英]regex for routing in rails 2.3.11
I am looking for a regex which can let me have a dot in the id in rails routes except the case when the format requested is xml or json, ie http://www.abc.com/users/efjson should mean id=ef and format=json http://www.abc.com/users/ef should mean id=ef 我正在寻找一个正则表达式,可以让我在Rails路由的ID中有一个点,除非请求的格式是xml或json,即http://www.abc.com/users/efjson应该表示id = ef和format = json http://www.abc.com/users/ef应该表示id = ef
Can someone help me? 有人能帮我吗? Thanks! 谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.