Fixed scope issue in tests

This commit is contained in:
Alexander Makarov
2012-04-10 21:49:24 +02:00
parent 69b49180ef
commit 85c0a3b355

View File

@ -23,9 +23,10 @@ class Customer extends ActiveRecord
public static function scopes()
{
$status = self::STATUS_ACTIVE;
return array(
'active' => function($q) {
return $q->andWhere('@.`status` = ' . self::STATUS_ACTIVE);
'active' => function($q) use ($status){
return $q->andWhere('@.`status` = ' . $status);
},
);
}