Permalink
Browse files

Docfix [#1444 state:committed]

  • Loading branch information...
1 parent 5ea9f2c commit db6b3a1f2c785fe3e32a96c386de24366c0bf0a1 @dhh dhh committed Nov 23, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/base.rb
@@ -2322,7 +2322,7 @@ def id
# 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 @@ def id
# 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

0 comments on commit db6b3a1

Please sign in to comment.