ow we are in a position to create microposts in the same way we created users in Section 2.2.1. As you might guess, the scaffold generator has updated the Rails routes file with a rule for Microposts resource, as seen in Listing 11.21.11 As with users, the
map.resources :microposts routing rule maps Micropost URLs to actions in the Microposts controller, as seen in Table 2.3.
- Chapter 2. A Demo App
- from Ruby on Rails™ 2.3 Tutorial: Learn Rails by Example
- Publisher: Addison-Wesley Professional
- Released: November 2010
Run the command "rake routes" to get a list of the commands in Table 2.3
Share this highlighthttp://www.safaribooksonline.com/a/ruby-on-railstm/17534/