Changeset 262
- Timestamp:
- 06/23/07 21:09:03 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/script/generators/controller/controller_generator.php
r2 r262 66 66 $this->save(AK_TEST_DIR.DS.'fixtures'.DS.'app'.DS.'helpers'.DS.$this->underscored_controller_name."_helper.php", $this->render('helper_fixture')); 67 67 68 @Ak::make_dir(AK_VIEWS_DIR.DS.AkInflector::underscore($this->class_name)); 69 68 70 foreach ((array)@$this->actions as $action){ 69 71 //$this->action = $action; trunk/script/generators/model/model_generator.php
r2 r262 68 68 $this->save($file_path, $this->render($template)); 69 69 } 70 71 $installer_path = AK_APP_DIR.DS.'installers'.DS.$this->underscored_model_name.'_installer.php'; 72 if(!file_exists($installer_path)){ 73 $this->save($installer_path, $this->render('installer')); 74 } 75 70 76 } 71 77 trunk/script/generators/model/templates/installer.tpl
r155 r262 5 5 function up_1() 6 6 { 7 $this->createTable('<?php echo $table_name?>', " 8 id integer not null auto increment pk 9 "); 7 /** / 8 $this->createTable('<?php echo AkInflector::tableize($class_name); ?>', " 9 id, 10 created_at, 11 updated_at 12 "); 13 /**/ 10 14 } 11 15 12 16 function down_1() 13 17 { 14 $this->dropTable('<?php echo $table_name?>'); 18 /** / 19 $this->dropTable('<?php echo AkInflector::tableize($class_name); ?>'); 20 /**/ 15 21 } 16 22
