我正在使用 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