Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #11807 from jetthoughts/11804_actions_are_public_m…

…ethods

Add description of action in Getting Started Guide [ci skip]
  • Loading branch information...
commit 8176006cf0dfcd8a5b953157a8dd4802984e883a 1 parent 20e0d4d
@steveklabnik steveklabnik authored senny committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 guides/source/getting_started.md
View
4 guides/source/getting_started.md
@@ -307,6 +307,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)
Please sign in to comment.
Something went wrong with that request. Please try again.