新手问题 rails generate controller store index,创建后不能直接访问

wgf4242 · 2013年02月28日 · 最后由 mayday 回复于 2013年02月28日 · 1830 次阅读

执行后不能直接访问 http://localhost:3000/store 但是可以访问http://localhost:3000/store/index

Routing Error No route matches [GET] "/store"

我看书上说是可以的啊。为什么我这里不行呢。。。求解决。。

config/routes.rb加一句:match 'store' => 'store#index' ,刚才写错了,不好意思

需要 登录 后方可回复, 如果你还没有账号请 注册新账号