Thursday, August 30, 2007

Some interesting features in CakePHP 1.2

After changing 1.1 up to 1.2 version. A have a lot of question. Some answer I can find, some - no.

Let's go...

1. If you want to make validation in 1.2, You must write this:

if ($this->YourModel->create($this->data) && $this->YourModel->validates()) {
validation ok
} else {
validation not ok
}


2. If you want to change default paginator in 1.2, you must define variable in your controller, like this:

var $paginate = array('limit' => 10, 'page' => 1, 'conditions' => 'User.id >= 2');

3. If you have 0000-00-00 00:00 in your default-named fields: created/modifiead...

I... I don't know what you must do ;-( Someone can help with this trouble?

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home