aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2012-03-14 11:51:29 -0700
committerRyan Bigg <radarlistener@gmail.com>2012-03-14 11:51:29 -0700
commit329db6ff6ccee1608979fed74aaf239c98f50b30 (patch)
tree400ae5ac6e8d6982f66a6564ffaebc4b37af799d /railties
parent7b2bd23b29954db50782a7e451104eb525374f74 (diff)
downloadrails-329db6ff6ccee1608979fed74aaf239c98f50b30.tar.gz
rails-329db6ff6ccee1608979fed74aaf239c98f50b30.tar.bz2
rails-329db6ff6ccee1608979fed74aaf239c98f50b30.zip
[getting started] briefly explain what a controller and view are
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/source/getting_started.textile9
1 files changed, 8 insertions, 1 deletions
diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile
index d2ca60f8d6..249bf67f57 100644
--- a/railties/guides/source/getting_started.textile
+++ b/railties/guides/source/getting_started.textile
@@ -158,7 +158,14 @@ The "Welcome Aboard" page is the _smoke test_ for a new Rails application: it ma
h4. Say "Hello", Rails
-To get Rails saying "Hello", you need to create at minimum a controller and a view. Fortunately, you can do that in a single command. Enter this command in your terminal:
+To get Rails saying "Hello", you need to create at minimum a _controller_ and a _view_.
+
+A controller's purpose is to receive specific requests for the application. What controller receives what request is determined by the _routing_. There is very often more than one route to each controller, and different routes can be served by different _actions_. Each action's purpose is to collect information to provide it to a view.
+
+A view's purpose is to display this information in a human readable format. An important distinction to make is that it is the _controller_, not the view, where information is collected. The view should just display that information. By default, view templates are written in a language called ERB (Embedded Ruby) which is converted by the request cycle in Rails before being sent to the user.
+
+
+To create a new controller, run this command:
<shell>
$ rails generate controller home index