-
(string) camelize ($lower_case_and_underscored_word)
Browse code
| $lower_case_and_underscored_word |
String to camelize.
|
Returns a camelized string from a lower case and underscored string by
replaceing slash with double-colon and upper-casing each letter preceded
by an underscore.
returns Camelized string.
-
(string) classify ($table_name)
Browse code
Returns model class name for given database table.
returns Classified table name.
-
(string) demodulize ($class_name_in_module)
Browse code
| $class_name_in_module |
Classname and module pair.
|
Returns classname::module with classname:: stripped off.
returns Module name.
-
(strong) foreign_key ($class_name, $separate_with_underscore = true)
Browse code
| $class_name |
Class name.
|
| $separate_with_underscore |
Separate with underscore.
|
Returns classname in underscored form, with "_id" tacked on at
the end.
This is for use in dealing with foreign keys in the database.
returns Foreign key
-
(string) humanize ($lower_case_and_underscored_word)
Browse code
| $lower_case_and_underscored_word |
String to make more readable.
|
Returns a human-readable string from a lower case and underscored word by
replacing underscores with a space, and by upper-casing the initial
characters.
returns Human-readable string.
-
(string) tableize ($class_name)
Browse code
| $class_name |
Name of class to get database table name for.
|
Returns corresponding table name for given classname.
returns Name of the databse table for given class.
-
(string) underscore ($camel_cased_word)
Browse code
| $camel_cased_word |
String to underscore.
|
Returns an underscore-syntaxed version or the CamelCased string.
returns Underscored string.