Skip to content

Commit

Permalink
Merge pull request #30 from lucasfevi/develop
Browse files Browse the repository at this point in the history
Fixed a bug in the relation when the type uses underscore. It was using strtolower...
  • Loading branch information
krolow committed Aug 27, 2014
2 parents 1ce72a0 + ca237f7 commit 80c40d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Model/Behavior/UploadBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected function _setRelationModel(Model $model, $type) {
'dependent' => true,
'conditions' => array(
'Attachment' . $type . '.model' => $model->alias,
'Attachment' . $type . '.type' => strtolower($type)),
'Attachment' . $type . '.type' => Inflector::underscore($type)),
'fields' => '',
'order' => ''
);
Expand Down

0 comments on commit 80c40d9

Please sign in to comment.