ActiveRecord#to_param docs: fix a few singular/plural errors

This commit is contained in:
Chris Kampmeier
2008-11-30 19:43:10 -08:00
parent e2380600d1
commit e264337c7b

View File

@@ -2323,15 +2323,15 @@ module ActiveRecord #:nodoc:
# object. The default implementation returns this record's id as a String,
# or nil if this record's unsaved.
#
# For example, suppose that you have a Users model, and that you have a
# <tt>map.resources :users</tt> route. Normally, +users_path+ will
# construct an URI with the user object's 'id' in it:
# For example, suppose that you have a User model, and that you have a
# <tt>map.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')
# user_path(path) # => "/users/1"
#
# You can override +to_param+ in your model to make +users_path+ construct
# an URI using the user's name instead of the user's id:
# You can override +to_param+ in your model to make +user_path+ construct
# a path using the user's name instead of the user's id:
#
# class User < ActiveRecord::Base
# def to_param # overridden