aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides/source/actioncontroller_basics
diff options
context:
space:
mode:
authorTore Darell <toredarell@gmail.com>2008-11-05 00:17:56 +0100
committerTore Darell <toredarell@gmail.com>2008-11-05 00:17:56 +0100
commit9d08df5bd8071db346b871e69ad76a59cc0f6430 (patch)
tree442308efc03d05bd4b83e75db307a1fe248b5bbf /railties/doc/guides/source/actioncontroller_basics
parentce66cc642aa9cbc8b162c8e02999259c87b640bb (diff)
downloadrails-9d08df5bd8071db346b871e69ad76a59cc0f6430.tar.gz
rails-9d08df5bd8071db346b871e69ad76a59cc0f6430.tar.bz2
rails-9d08df5bd8071db346b871e69ad76a59cc0f6430.zip
Use ApplicationController instead of AC::B in example
Diffstat (limited to 'railties/doc/guides/source/actioncontroller_basics')
-rw-r--r--railties/doc/guides/source/actioncontroller_basics/methods.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/doc/guides/source/actioncontroller_basics/methods.txt b/railties/doc/guides/source/actioncontroller_basics/methods.txt
index 370b492e41..239977abd8 100644
--- a/railties/doc/guides/source/actioncontroller_basics/methods.txt
+++ b/railties/doc/guides/source/actioncontroller_basics/methods.txt
@@ -1,10 +1,10 @@
== Methods and actions ==
-A controller is a Ruby class which inherits from ActionController::Base and has methods just like any other class. Usually these methods correspond to actions in MVC, but they can just as well be helpful methods which can be called by actions. When your application receives a request, the routing will determine which controller and action to run. Then an instance of that controller will be created and the method corresponding to the action (the method with the same name as the action) gets run.
+A controller is a Ruby class which inherits from ApplicationController and has methods just like any other class. Usually these methods correspond to actions in MVC, but they can just as well be helpful methods which can be called by actions. When your application receives a request, the routing will determine which controller and action to run. Then an instance of that controller will be created and the method corresponding to the action (the method with the same name as the action) gets run.
[source, ruby]
----------------------------------------------
-class ClientsController < ActionController::Base
+class ClientsController < ApplicationController
# Actions are public methods
def new
@@ -35,3 +35,5 @@ end
----------------------------------------------
The link:../layouts_and_rendering.html[Layouts & rendering guide] explains this in more detail.
+
+ApplicationController inherits from ActionController::Base, which defines anumber of helpful methods. This guide will cover some of these, but if you're curious to see what's in there, you can see all of them in the API documentation or in the source itself.