| File: | 
models/??? | 
 
| Role: | 
Class source | 
 
| Content type: | 
text/plain | 
 
| Description: | 
Class source | 
 
| Class: | 
torm 
Store and retrieve objects using ActiveRecord | 
 
| Author: | 
By Eustaquio Rangel de Oliveira Jr. | 
 
|  Last change: | 
Renamed after_initialize to afterInitialize. 
 
Following 
http://framework.zend.com/manual/1.11/en/coding-standard.naming-conventions.html 
 
"Function names may only contain alphanumeric characters. Underscores are not 
permitted." 
 
"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. 
 | 
 
| Date: | 
11 years ago | 
 
| Size: | 
2,162 bytes | 
 
 | 
 
 
 | 
 |