July 2011
Intermediate to advanced
400 pages
8h 46m
English
Before moving on, let’s take a closer look at the class that you have created in this application. Rails has named the class by appending Controller to the name you specified when running the controller generator script (HelloWorld), and it has made it a descendant of the ApplicationController class:
class SayHelloController < ApplicationController
But what exactly is the ApplicationController class? You may recall that I mentioned that the generate controller script you ran earlier silently created a file called application_controller.rb (Rails 3) or application.rb (Rails 2) inside the /app/controllers folder. This file is the application controller, and if you open it, you will see that it contains a class ...
Read now
Unlock full access