aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/inflector.rb
diff options
context:
space:
mode:
authorYaroslav Markin <yaroslav@markin.net>2008-11-25 12:26:46 +0300
committerYaroslav Markin <yaroslav@markin.net>2008-11-25 12:26:46 +0300
commit010cce6ad1d134786eaa3f814319ebbe2e63123b (patch)
treec57a40a34e0fcdc0aa31ad00aaec0ad32a3de705 /activesupport/lib/active_support/inflector.rb
parentc98bcfa55c8e61a0a956ebd2cc15b9e5216aa685 (diff)
downloadrails-010cce6ad1d134786eaa3f814319ebbe2e63123b.tar.gz
rails-010cce6ad1d134786eaa3f814319ebbe2e63123b.tar.bz2
rails-010cce6ad1d134786eaa3f814319ebbe2e63123b.zip
Fix an example of using Inflector's #parameterize.
Diffstat (limited to 'activesupport/lib/active_support/inflector.rb')
-rw-r--r--activesupport/lib/active_support/inflector.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/inflector.rb b/activesupport/lib/active_support/inflector.rb
index ba52e41c08..5cb665ef75 100644
--- a/activesupport/lib/active_support/inflector.rb
+++ b/activesupport/lib/active_support/inflector.rb
@@ -256,7 +256,7 @@ module ActiveSupport
# @person = Person.find(1)
# # => #<Person id: 1, name: "Donald E. Knuth">
#
- # <%= link_to(@person.name, person_path %>
+ # <%= link_to(@person.name, person_path(@person)) %>
# # => <a href="/person/1-donald-e-knuth">Donald E. Knuth</a>
def parameterize(string, sep = '-')
re_sep = Regexp.escape(sep)