【发布时间】:2010-12-09 03:26:04
【问题描述】:
我的routes.rb 有以下两行:
match "/", :to => "main#index"
match "main/index", :to => "main#index"
当我在浏览器中输入 localhost:3000/main/index 时,我看到了正确的页面 (views/main/index.html.erb)。
但是,如果我只输入localhost:3000,我会看到public/index.html(我也希望看到views/main/index.html.erb)。
我错过了什么?
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-3 routes