Before we put the controller function is not accurate, corresponding resources can also be more common such as Weibo resources, news resources.
7 Common ways to access resources are index and other systems that help us name the default action
Create is the creation of a book, and new is the page that created it, which is then sent to create for creation, or create to complete
We should also name the Controller and action to match the above better.
Weibo applications definitely need resources, and this resource is fully responsible for the various access features of Weibo.
A controller often corresponds to a resource.
Create a Controller and action
Index gets all Weibo, create creates a Weibo, show displays the specified Weibo
To create a posts controller with 4 action, we use this controller to operate the corresponding posts resource.
We created the Weibo controller, but the resources are definitely empty, and we need to create resources with new and created.
After you create the controller and the action, then you go to change the route
We want to open Weibo and see all of our tweets, so we're going to have to route this to the Weibo homepage.
Switch
The results are as follows
?
?
?
?
?
Resources in the 5--rails schema