Fix an example of using Inflector's #parameterize.

This commit is contained in:
Yaroslav Markin
2008-11-25 12:26:46 +03:00
parent c98bcfa55c
commit 010cce6ad1

View File

@@ -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)