Ruby On Rails Lesson
Having finished both the data modeling and display templates for microposts, we now turn our attention to the interface for creating them through the web. The result will be our third example of using an HTML form to create a resource—in this case, a Microposts resource.7 In this section, we’ll also see the first hint of a status feed—a notion brought to full fruition in Chapter 11. Finally, as with users, we’ll make it possible to destroy microposts through the web.
There is one break with past convention worth noting: The interface to the Microposts resource will run principally through the Users and StaticPages controllers, rather than relying on a controller of its own. This means that the routes for the Microposts resource are unusually simple, as seen in Listing 10.25. The code in