What is the difference between an action and an instance method?

This described in the controller

``ruby:XXX.controller.rb`


def action name
  XXXXXX
end

Is this an action or an instance method, which is correct? What is the difference?

action

=> Name when specified in routing

So this is an action

config/routes.rb


Rails.application.routes.draw do
  get 'index' to: "tweets#index"

Instance method

=> 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. .. ..

``ruby:XXX.controller.rb`


def action name
  XXXXXX
end

Recommended Posts

What is the difference between an action and an instance method?
What is the difference between SimpleDateFormat and DateTimeFormatter? ??
What is the difference between a web server and an application server?
What is the difference between a class and a struct? ?? ??
What is the difference between System Spec and Feature Spec?
[Rails] What is the difference between redirect and render?
[JAVA] What is the difference between interface and abstract? ?? ??
What is the difference between skip and pending? [RSpec]
What is the difference between Java EE and Jakarta EE?
Difference between instance method and class method
[Rails] What is the difference between bundle install and bundle update?
[Java] What is the difference between form, entity and dto? [Bean]
Easy to understand the difference between Ruby instance method and class method.
What is the pluck method?
Difference between variables and instance variables
[Ruby] What is an instance?
Difference between class and instance
What is the initialize method?
[Ruby] What is the slice method? Let's solve the example and understand the difference from slice!
Difference between render method and redirect_to
Difference between == operator and equals method
Difference between == operator and eqals method
Understand the difference between each_with_index and each.with_index
Difference between instance variable and class variable
Jersey --What is Difference Between bind and bindAsContract in HK2?
Let's override the difference between == (identity) and equals method (equivalence)
What is the difference between the responsibilities of the domain layer and the application layer in the onion architecture [DDD]
Now in the third year, the misunderstanding that I noticed is the difference between the equals method and ==
[Ruby] Relationship between parent class and child class. The relationship between a class and an instance.
Difference between Ruby instance variable and local variable
What is the main method in Java?
About the difference between irb and pry
[Rails] I studied the difference between new method, save method, build method and create method.
[Java] Understand the difference between List and Set
[iOS] Understand the difference between frame and bounds
Understand the difference between abstract classes and interfaces!
[Rails] Difference between create method and new + save method
Let's explain the difference between an interpreter and a compiler using a Venn diagram
[Ruby] Difference between methods with and without self in the class. About class methods and instance methods.
What is instance control?
What is an operator?
What is an annotation?
What is @ (instance variable)?
Difference between vh and%
Difference between i ++ and ++ i
[Ruby] I thought about the difference between each_with_index and each.with_index
[Rails] I learned about the difference between resources and resources
Understanding ruby's "|| =" specification and what is Rails presence method?
Ethereum Transaction Sending Method Difference between send and sendAsync
About the difference between classes and instances in Ruby
Difference between new and create in Rais action controller
Is there an instance even if the constructor fails?
Compare the difference between dockerfile before and after docker-slim
[Rails] I investigated the difference between redirect_to and render.
[Swift] UITextField taught me the difference between nil and ""
Is there a performance difference between Oracle JDK and OpenJDK at the end of 2017?
Difference between product and variant
The permission specification of the FileUtils method is an octal number.
Difference between redirect_to and render
[Java] Difference between == and equals
Rails: Difference between resources and resources