diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-11-23 13:43:59 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-11-23 13:43:59 +0100 |
commit | db6b3a1f2c785fe3e32a96c386de24366c0bf0a1 (patch) | |
tree | 3a8e7d2477e5bc4d40a868812dbe76982f2a3714 | |
parent | 5ea9f2cac6e136e27d7fef2662412dda25391860 (diff) | |
download | rails-db6b3a1f2c785fe3e32a96c386de24366c0bf0a1.tar.gz rails-db6b3a1f2c785fe3e32a96c386de24366c0bf0a1.tar.bz2 rails-db6b3a1f2c785fe3e32a96c386de24366c0bf0a1.zip |
Docfix [#1444 state:committed]
-rwxr-xr-x | 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 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 |