Store and retrieve objects using ActiveRecord
||By Eustaquio Rangel de Oliveira Jr.
||Renamed after_initialize to afterInitialize.
"Function names may only contain alphanumeric characters. Underscores are not
"Function names must always start with a lowercase letter. When a function name
consists of more than one word, the first letter of each new word must be
capitalized. This is commonly called 'camelCase' formatting."
"For methods on objects that are declared with the "private" or "protected"
modifier, the first character of the method name must be an underscore. This is
the only acceptable application of an underscore in a method name."
After initialize callback.
Moving the before filters *before* the validations, when saving.
Now if there are something to be done *before* checking if is a valid record,
(for example, remove weird chars from some attribute), it will be done with the
before save callbacks before the validation on the save method.
||7 years ago