From 20d3892f46c553e8ca3d4e8d223a3bd92789556d Mon Sep 17 00:00:00 2001 From: Sam Granieri Date: Sat, 7 Mar 2009 10:54:27 +0000 Subject: Allow String#parameterize to accept a separator [#2157 state:resolved] Signed-off-by: Pratik Naik --- activesupport/lib/active_support/core_ext/string/inflections.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb index 15ad3d99cc..48e812aaf8 100644 --- a/activesupport/lib/active_support/core_ext/string/inflections.rb +++ b/activesupport/lib/active_support/core_ext/string/inflections.rb @@ -102,8 +102,8 @@ module ActiveSupport #:nodoc: # # <%= link_to(@person.name, person_path %> # # => Donald E. Knuth - def parameterize - Inflector.parameterize(self) + def parameterize(sep = '-') + Inflector.parameterize(self, sep) end # Creates the name of a table like Rails does for models to table names. This method -- cgit v1.2.3