From 4d295133a35d3f8f2c8f97e4dd5a48d0f11a18f8 Mon Sep 17 00:00:00 2001 From: SilverFire - Dmitry Naumenko Date: Fri, 15 Jan 2016 17:43:13 +0200 Subject: [PATCH] ActiveRecord::perform() - fixed action name generation for non-bulk requests --- src/ActiveRecord.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ActiveRecord.php b/src/ActiveRecord.php index 259f4ef..9acff7f 100644 --- a/src/ActiveRecord.php +++ b/src/ActiveRecord.php @@ -352,7 +352,7 @@ protected function updateInternal($attributes = null, $options = []) */ public static function perform($action, $options = [], $bulk = false) { - $action = ($bulk === true) ? static::index() . $action : static::modelName() . $action; + $action = ($bulk === true ? static::index() : static::type()) . $action; $result = static::getDb()->createCommand()->perform($action, $options); return $result;