rails generate scaffold Micropost content:string user_id:integer

Having generated and explored the Users resource, we turn now to the
associated Microposts resource. Throughout this section, I recommend
comparing the elements of the Microposts resource with the analogous
user elements from Section 2.2; you should see that the two resources
parallel each other in many ways. The RESTful structure of Rails
applications is best absorbed by this sort of repetition of form;
indeed, seeing the parallel structure of Users and Microposts even at
this early stage is one of the prime motivations for this chapter. (As
we’ll see, writing applications more robust than the toy example in this
chapter takes considerable effort—we won’t see the Microposts resource
again until Chapter 10—and I didn’t want to defer its first appearance
quite that far.)