Permalink
Browse files

Working with CakePHP 2.1

  • Loading branch information...
1 parent 5569e93 commit 1764e035edbeb209975f89adfe9114f1182f2479 @voidet committed Mar 20, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Model/Behavior/TagTimeBehavior.php
View
4 Model/Behavior/TagTimeBehavior.php
@@ -33,7 +33,7 @@ function afterFind(&$Model, $results, $primary = false) {
if ($clear_model === true) {
unset($results[$key][$assoc_key]);
}
- $result[$assoc_key][$assoc_key] = implode(',', $tags);
+ $result[$assoc_key][Inflector::pluralize($tag_field)] = implode(',', $tags);
}
}
}
@@ -65,7 +65,7 @@ function beforeValidate(&$Model) {
function _getTagIds($assoc_key, $assoc_model, &$Model) {
extract($this->settings);
- $tags = explode($separator, $Model->data[$assoc_key][$assoc_key]);
+ $tags = explode($separator, $Model->data[$assoc_key][Inflector::pluralize($tag_field)]);
if (Set::filter($tags)) {
$tagIds = array();

0 comments on commit 1764e03

Please sign in to comment.