Action and method in Rails controller
ruby-on-rails
Solution
Action is also a method but it has a corresponding route, you can hit an action by using it's route but you can't call method an action if it doesn't have any route associated with it.
e.g. In rails new, index, create, show, update, delete and edit are default actions, because all these methods have routes associated with them. But if you define a method in the controller which is called by an action but it doesn't have any route associated with it then its a method but not an action.
Problem
In http://guides.rubyonrails.org/action_controller_overview.html I read that Rails creates an instance of that controller and runs the method with the same name as the action. so i don't understand, what is difference between actions and public methods in controller. Actions and public methods in controller are not the same?