From db6b3a1f2c785fe3e32a96c386de24366c0bf0a1 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 23 Nov 2008 13:43:59 +0100 Subject: Docfix [#1444 state:committed] --- activerecord/lib/active_record/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index cff5fd7a42..6692235a78 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -2322,7 +2322,7 @@ module ActiveRecord #:nodoc: # construct an URI with the user object's 'id' in it: # # user = User.find_by_name('Phusion') - # user_path(path) # => "/users/1" + # user_path(user) # => "/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: @@ -2334,7 +2334,7 @@ module ActiveRecord #:nodoc: # end # # user = User.find_by_name('Phusion') - # user_path(path) # => "/users/Phusion" + # user_path(user) # => "/users/Phusion" def to_param # We can't use alias_method here, because method 'id' optimizes itself on the fly. (id = self.id) ? id.to_s : nil # Be sure to stringify the id for routes -- cgit v1.2.3