我的 Rails 应用程序路由如下所示:
match 'Events/New' => 'event#new'
match 'Events/:date' => 'event#show', :date => /[A-Z][a-z]{2}-\d{2}-\d{4}/
match 'Events/:date/Venue' => 'event#venue', :date => /[A-Z][a-z]{2}-\d{2}-\d{4}/
match 'Events/:date/Speakers' => 'event#speakers', :date => /[A-Z][a-z]{2}-\d{2}-\d{4}/
有什么方法可以嵌套并清理它吗?我怀疑它在 :date 上多次运行正则表达式,而嵌套理论上可以使它运行一次。