我使用Rails 3.2.7。 我有一个控制器和行动,因为它的显示如下:
class BookController < ApplicationController
def list
@books = Book.find(:all)
end
end
我还创建了一个名为模型book.rb
下模型和list.rhtml
内\app\views\book
文件夹。 当我打http://127.0.0.1:3000/book/list
,我得到这个错误:
No route matches [GET] "/book/list"**
下面是config/routes.rb
:
Ravi::Application.routes.draw do
# The priority is based upon order of creation:
# first created -> highest priority.
# rest of the explanations in default "config/routes.rb"
end