This described in the controller
def action name
XXXXXX
end
Is this an action or an instance method, which is correct? What is the difference?
=> Name when specified in routing
So this is an action
config/routes.rb
Rails.application.routes.draw do
get 'index' to: "tweets#index"
=> Code of the form "def XXXX ~ end" implemented in the controller that is actually executed by specifying the action
In other words, this code written above becomes an action. So that's it. .. ..
def action name
XXXXXX
end
Recommended Posts