Browse Source

BelongsToMany elements should be the property name not the association name.

mark_story 12 years ago
parent
commit
76942d43a7

+ 1 - 1
src/Console/Templates/default/views/form.ctp

@@ -34,7 +34,7 @@ use Cake\Utility\Inflector;
 		}
 		if (!empty($associations['BelongsToMany'])) {
 			foreach ($associations['BelongsToMany'] as $assocName => $assocData) {
-				echo "\t\techo \$this->Form->input('{$assocName}._ids', ['options' => \${$assocData['variable']}]);\n";
+				echo "\t\techo \$this->Form->input('{$assocData['property']}._ids', ['options' => \${$assocData['variable']}]);\n";
 			}
 		}
 		echo "\t?>\n";

+ 0 - 2
src/Console/Templates/default/views/index.ctp

@@ -1,7 +1,5 @@
 <?php
 /**
- *
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *