铁路路线问题

时间:2011-03-24 07:18:02

标签: ruby-on-rails ruby-on-rails-3 routes

这是我的routes.i想要防止重复的网址

match ':id' => 'people#show'
match 'people/:id' => redirect("%{id}")

1 个答案:

答案 0 :(得分:0)

怎么样?

match '(people)/:id' => 'people#show'

Bound Parameters