Froze rails gems
[depot.git] / vendor / rails / railties / doc / guides / source / actioncontroller_basics / introduction.txt
diff --git a/vendor/rails/railties/doc/guides/source/actioncontroller_basics/introduction.txt b/vendor/rails/railties/doc/guides/source/actioncontroller_basics/introduction.txt
new file mode 100644 (file)
index 0000000..6ea217d
--- /dev/null
@@ -0,0 +1,9 @@
+== 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 that data to the user, and it saves or updates data from the user to the model.
+
+NOTE: For more details on the routing process, see link:../routing_outside_in.html[Rails Routing from the Outside In].