Permalink
Browse files

Fix an example of using Inflector's #parameterize.

  • Loading branch information...
1 parent c98bcfa commit 010cce6ad1d134786eaa3f814319ebbe2e63123b @yaroslav yaroslav committed Nov 25, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/inflector.rb
@@ -256,7 +256,7 @@ def demodulize(class_name_in_module)
# @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)

0 comments on commit 010cce6

Please sign in to comment.