Update various documentation examples to use new routing DSL

This commit is contained in:
Andrew White
2010-04-04 17:34:13 +01:00
parent 824fa10f4d
commit 48b2451142
4 changed files with 5 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ module ActionController
# the view actions to a higher logical level. Example:
#
# # routes
# map.resources :posts
# resources :posts
#
# # view
# <% div_for(post) do %> <div id="post_45" class="post">

View File

@@ -63,7 +63,7 @@ module ActionDispatch
# named routes. For example, suppose that you have a 'users' resource in your
# <b>routes.rb</b>:
#
# map.resources :users
# resources :users
#
# This generates, among other things, the method <tt>users_path</tt>. By default,
# this method is accessible from your controllers, views and mailers. If you need

View File

@@ -9,8 +9,8 @@ module ActionView
#
# config/routes.rb:
# Basecamp::Application.routes.draw do |map|
# map.resources :posts
# map.root :controller => "posts"
# resources :posts
# root :to => "posts#index"
# end
#
# app/controllers/posts_controller.rb:

View File

@@ -1572,7 +1572,7 @@ module ActiveRecord #:nodoc:
# or nil if this record's unsaved.
#
# For example, suppose that you have a User model, and that you have a
# <tt>map.resources :users</tt> route. Normally, +user_path+ will
# <tt>resources :users</tt> route. Normally, +user_path+ will
# construct a path with the user object's 'id' in it:
#
# user = User.find_by_name('Phusion')