Browse files

[Guides] Add inflector example

  • Loading branch information...
1 parent 3e7d43b commit 26149260bfe5aaee162586e6d1fa54365f8a773e @oscardelben oscardelben committed May 25, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 guides/source/initialization.textile
@@ -752,6 +752,10 @@ h4. +active_support/inflections+
This file references the +ActiveSupport::Inflector+ constant which isn't loaded by this point. But there were autoloads set up in +activesupport/lib/active_support.rb+ which will load the file which loads this constant and so then it will be defined. Then this file defines pluralization and singularization rules for words in Rails. This is how Rails knows how to pluralize "tomato" to "tomatoes".
+inflect.irregular('zombie', 'zombies')
h4. +activesupport/lib/active_support/inflector/transliterate.rb+
In this file is where the "+transliterate+": and +parameterize+: methods are defined. The documentation for both of these methods is very much worth reading.

0 comments on commit 2614926

Please sign in to comment.