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:
parent
d126a081ed
commit
0dd76e1900
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue