From abe9c1e4eb800b70c0cc6a14b5b261d3177828a5 Mon Sep 17 00:00:00 2001 From: Bryan Dragon Date: Sat, 22 Nov 2008 16:32:48 -0500 Subject: [PATCH] Fixed a typo in the to_param comment. --- activerecord/lib/active_record/base.rb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index cff5fd7..6692235 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 -- 1.6.0.2