summaryrefslogtreecommitdiffstats
path: root/user_guide_src
diff options
context:
space:
mode:
authorEric Barnes <eric@ericlbarnes.com>2011-12-09 17:27:51 +0100
committerEric Barnes <eric@ericlbarnes.com>2011-12-09 17:27:51 +0100
commitcde712ce354dcfd69f9c5e2b56ef7d6f1206d11a (patch)
tree85aaa507b2ca7f6ef7bb0650a38bcf1442899b64 /user_guide_src
parentdb351e6672d2f6d6d2015ad8b053d910911c2bc4 (diff)
Added ability to change the separator value in the humanize function
Diffstat (limited to 'user_guide_src')
-rw-r--r--user_guide_src/source/changelog.rst1
-rw-r--r--user_guide_src/source/helpers/inflector_helper.rst6
2 files changed, 7 insertions, 0 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 205b087f5..6f41f4519 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -33,6 +33,7 @@ Release Date: Not Released
- url_title() will now trim extra dashes from beginning and end.
- Added XHTML Basic 1.1 doctype to :doc:`HTML Helper <helpers/html_helper>`.
+ - Changed humanize to include a second param for the separator.
- Database
diff --git a/user_guide_src/source/helpers/inflector_helper.rst b/user_guide_src/source/helpers/inflector_helper.rst
index cf246b9de..cc46a1851 100644
--- a/user_guide_src/source/helpers/inflector_helper.rst
+++ b/user_guide_src/source/helpers/inflector_helper.rst
@@ -77,3 +77,9 @@ them. Each word is capitalized. Example
$word = "my_dog_spot";
echo humanize($word); // Returns "My Dog Spot"
+To use dashes instead of underscores
+
+::
+
+ $word = "my-dog-spot";
+ echo humanize($word, '-'); // Returns "My Dog Spot" \ No newline at end of file