1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

#11804: Add description of action in Getting Started Guide

[ci skip]

Closes #11804
This commit is contained in:
Paul Nikitochkin 2013-08-08 14:12:23 +03:00
parent d126a081ed
commit 0dd76e1900

View file

@ -310,6 +310,10 @@ end
A controller is simply a class that is defined to inherit from `ApplicationController`. It's inside this class that you'll define methods that will become the actions for this controller. These actions will perform CRUD operations on the posts within our system.
NOTE: There are `public`, `private` and `protected` methods in `Ruby`
(for more details you can check on [Programming Ruby](http://www.ruby-doc.org/docs/ProgrammingRuby/)).
But only `public` methods can be actions for controllers.
If you refresh <http://localhost:3000/posts/new> now, you'll get a new error:
![Unknown action new for PostsController!](images/getting_started/unknown_action_new_for_posts.png)