Rails Rails 2.x 中可选路由的问题

tsinghan · April 25, 2012 · 2050 hits

map.page '/:city/:section', :action => 'page', :section => "default", :city => nil

rails 2 中也可以实现 可选路由 只要在后面给它设置默认值 即可 但是 如果我想 用正则来匹配参数,:section => /\d+/ 这样就会冲突,该怎么处理这种情况呢?

No Reply at the moment.
You need to Sign in before reply, if you don't have an account, please Sign up first.