Relationship between Controller and View
Relationship between Controller and View
Create a file in the app / views directory to generate the views returned to the browser. Specifically, create a directory with the same controller name in this directory, and place the view file under it. This allows you to associate a controller with a view file, and the associated view file is combined with a "layout" or "partial template" and displayed in the browser.
@Tweets acquired by the controller is read through multiple methods defined behind Ruby on Rails and passed to Action View. And it is set as an instance variable of the view file again, and it can be used for the first time.
In order to understand the process that realizes "a mechanism that can be used as it is in a view file if you define an instance variable", you need to read the source code that builds Ruby on Rails.