Merge pull request #2496 from LukeTowers/patch-7

Pass current model to RelationController view & manage scopes
This commit is contained in:
Samuel Georges 2016-11-18 08:21:50 +11:00 committed by GitHub
commit 97b0bc481f
1 changed files with 2 additions and 2 deletions

View File

@ -645,7 +645,7 @@ class RelationController extends ControllerBehavior
}
elseif ($scopeMethod = $this->getConfig('view[scope]')) {
$widget->bindEvent('list.extendQueryBefore', function($query) use ($scopeMethod) {
$query->$scopeMethod();
$query->$scopeMethod($this->model);
});
}
else {
@ -775,7 +775,7 @@ class RelationController extends ControllerBehavior
}
elseif ($scopeMethod = $this->getConfig('manage[scope]')) {
$widget->bindEvent('list.extendQueryBefore', function($query) use ($scopeMethod) {
$query->$scopeMethod();
$query->$scopeMethod($this->model);
});
}
else {