Commit 85c0a3b3 by Alexander Makarov

Fixed scope issue in tests

parent 69b49180
...@@ -23,9 +23,10 @@ class Customer extends ActiveRecord ...@@ -23,9 +23,10 @@ class Customer extends ActiveRecord
public static function scopes() public static function scopes()
{ {
$status = self::STATUS_ACTIVE;
return array( return array(
'active' => function($q) { 'active' => function($q) use ($status){
return $q->andWhere('@.`status` = ' . self::STATUS_ACTIVE); return $q->andWhere('@.`status` = ' . $status);
}, },
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment