aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/inflector_test_cases.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2008-09-10 00:26:50 -0500
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-09-10 00:26:50 -0500
commitb8e8be83e952163e225f9b38bd7251cba9c44f38 (patch)
tree42887c2ce47fd11cf634406e1a109f35f020bdf8 /activesupport/test/inflector_test_cases.rb
parentb141624abbd1be6aa9836708fe4c20c03af5ab3b (diff)
downloadrails-b8e8be83e952163e225f9b38bd7251cba9c44f38.tar.gz
rails-b8e8be83e952163e225f9b38bd7251cba9c44f38.tar.bz2
rails-b8e8be83e952163e225f9b38bd7251cba9c44f38.zip
Added Inflector#parameterize for easy slug generation ("Donald E. Knuth".parameterize => "donald-e-knuth") #713 [Matt Darby]
Diffstat (limited to 'activesupport/test/inflector_test_cases.rb')
-rw-r--r--activesupport/test/inflector_test_cases.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/inflector_test_cases.rb b/activesupport/test/inflector_test_cases.rb
index a9dd83a389..d399c90385 100644
--- a/activesupport/test/inflector_test_cases.rb
+++ b/activesupport/test/inflector_test_cases.rb
@@ -142,6 +142,11 @@ module InflectorTestCases
"NodeChild" => "node_children"
}
+ StringToParameterized = {
+ "Donald E. Knuth" => "donald-e-knuth",
+ "Random text with *(bad)* characters" => "random-text-with-bad-characters"
+ }
+
UnderscoreToHuman = {
"employee_salary" => "Employee salary",
"employee_id" => "Employee",