Sunday, October 25, 2009

Format string for titles

How to change "ClassTest" to "Class Tests"?

"ClassTest".titlecase.pluralize

or

"ClassTest".titleize.pluralize

No comments:

Blog Archive