Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Working with CakePHP 2.1

  • Loading branch information...
commit 1764e035edbeb209975f89adfe9114f1182f2479 1 parent 5569e93
Richard S authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 Model/Behavior/TagTimeBehavior.php
4 Model/Behavior/TagTimeBehavior.php
@@ -33,7 +33,7 @@ function afterFind(&$Model, $results, $primary = false) {
33 33 if ($clear_model === true) {
34 34 unset($results[$key][$assoc_key]);
35 35 }
36   - $result[$assoc_key][$assoc_key] = implode(',', $tags);
  36 + $result[$assoc_key][Inflector::pluralize($tag_field)] = implode(',', $tags);
37 37 }
38 38 }
39 39 }
@@ -65,7 +65,7 @@ function beforeValidate(&$Model) {
65 65 function _getTagIds($assoc_key, $assoc_model, &$Model) {
66 66
67 67 extract($this->settings);
68   - $tags = explode($separator, $Model->data[$assoc_key][$assoc_key]);
  68 + $tags = explode($separator, $Model->data[$assoc_key][Inflector::pluralize($tag_field)]);
69 69
70 70 if (Set::filter($tags)) {
71 71 $tagIds = array();

0 comments on commit 1764e03

Please sign in to comment.
Something went wrong with that request. Please try again.