mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Fix an example of using Inflector's #parameterize.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user