From e7c90e646b48b7995401e3db963431664f045b00 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Fri, 15 Nov 2013 16:11:26 +0100 Subject: [PATCH] explain how `to_param` wil truncate long values. [ci skip] refs #12900. --- activerecord/lib/active_record/integration.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/activerecord/lib/active_record/integration.rb b/activerecord/lib/active_record/integration.rb index f8aa0c55db..27576b1e61 100644 --- a/activerecord/lib/active_record/integration.rb +++ b/activerecord/lib/active_record/integration.rb @@ -81,6 +81,9 @@ module ActiveRecord # user.id # => 123 # user_path(user) # => "/users/123-fancy-pants" # + # Values longer than 20 characters will be truncated. The value + # is truncated word by word. + # # user = User.find_by(name: 'David HeinemeierHansson') # user.id # => 125 # user_path(user) # => "/users/125-david"