I am following a tutorial for building a very simple rails app. I have created a simple controller that looks like this
class AnimalsController < ApplicationController
end
and I have a folder inside of views called animals with a rhtml file called hello.rhtml containing some basic text. Now when I start the server and go visit
http://localhost:3000/animals/hello
I get a Routing Error. I am not sure what I am doing wrong?
Unlike some frameworks, the routes are not automatically created from the methods that exist in the controller, you need the following in config/routes.rb
You can read about routing here.
You can find out the routes for your current project by typing
rake routesin your terminal.