aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides/source/actioncontroller_basics/introduction.txt
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-10-21 15:58:29 +0100
committerPratik Naik <pratiknaik@gmail.com>2008-10-21 16:04:38 +0100
commit5265a8cd40a59ae792da3ed3f2a9648f15ecbd4e (patch)
tree44f66c3d1552e1821454658c653f062baada8668 /railties/doc/guides/source/actioncontroller_basics/introduction.txt
parentfa09de351c8045c7e7a0f268188ccf80c827b079 (diff)
downloadrails-5265a8cd40a59ae792da3ed3f2a9648f15ecbd4e.tar.gz
rails-5265a8cd40a59ae792da3ed3f2a9648f15ecbd4e.tar.bz2
rails-5265a8cd40a59ae792da3ed3f2a9648f15ecbd4e.zip
Rearrange guides
Diffstat (limited to 'railties/doc/guides/source/actioncontroller_basics/introduction.txt')
-rw-r--r--railties/doc/guides/source/actioncontroller_basics/introduction.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/doc/guides/source/actioncontroller_basics/introduction.txt b/railties/doc/guides/source/actioncontroller_basics/introduction.txt
new file mode 100644
index 0000000000..e4b0953b95
--- /dev/null
+++ b/railties/doc/guides/source/actioncontroller_basics/introduction.txt
@@ -0,0 +1,7 @@
+== What does a controller do? ==
+
+Action Controller is the C in MVC. After routing has determined which controller to use for a request, your controller is responsible for making sense of the request and producing the appropriate output. Luckily, Action Controller does most of the groundwork for you and uses smart conventions to make this as straight-forward as possible.
+
+For most conventional RESTful applications, the controller will receive the request (this is invisible to you as the developer), fetch or save data from a model and use a view to create HTML output. If your controller needs to do things a little differently, that's not a problem, this is just the most common way for a controller to work.
+
+A controller can thus be thought of as a middle man between models and views. It makes the model data available to the view so it can display it to the user, and it saves or updates data from the user to the model.