Permalink
Browse files

Update en/console-and-shells/schema-management-and-migrations.rst

ClassRegistry needs to be imported at least on my side (Cakephp 2.3, running through console)
  • Loading branch information...
1 parent 92f71f2 commit d54c81cce6322ff7abe426d79c93b2f61d8cf80e @ezequielp ezequielp committed Feb 27, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 en/console-and-shells/schema-management-and-migrations.rst
@@ -62,6 +62,7 @@ Adding data to a posts table for example would like this::
if (isset($event['create'])) {
switch ($event['create']) {
case 'posts':
+ App::uses('ClassRegistry', 'Utility');
$post = ClassRegistry::init('Post');
$post->create();
$post->save(

0 comments on commit d54c81c

Please sign in to comment.