I am using Rails 3.2.7. I have a controller and a action as it's shown below:
class BookController < ApplicationController
def list
@books = Book.find(:all)
end
end
I also created a model with the name book.rb
under model and a list.rhtml
inside \app\views\book
folder. When I hit http://127.0.0.1:3000/book/list
, I am getting this error:
No route matches [GET] "/book/list"**
Here's 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