Little help with $model->attributes

Hello guys,

I have authitem model.

When I submit my form I get:




Please fix the following input errors:


    * Name cannot be blank.



However, take a look in my $_POST content


Array ( [name] => List [type] => 1 [description] => Test [bizrule] => [data] =>) 

Piece of action create code:




$model->attributes=$_POST['authitem'];



Print attributes:


Array ( [type] => 1 [description] => Test [bizrule] => [data] => [name] =>) 

When I do this:


$model->name = $_POST['authitem']['name'];

I get it working…

Why $model->attributes is not working fine?

safeAttributes?

Thank you Qiang! I had missed it