title: pass an array to action using ajax YII
body: <p>Hi i'm really new with YII, please help me to solve a simple problem.
  I'm trying to pass some values from js to action and then to put them into database.
  Most of this code i got from tutorial</p>
  
  <pre><code>public function actionInsert(){
      $post = file_get_contents("php://input");
      $data = CJSON::decode($post, true);
      $read = new Read();
      $read-&gt;attributes = $data;
      $response = array();
  
      $read-&gt;save();
  }
  </code></pre>
  
  <p>Then i send:</p>
  
  <pre><code>$.ajax({
              type: "POST",
              url: "/read/insert/",
              data: "name=imja&amp;short_desc=korotkoe&amp;author=avtor&amp;image=photo",
              error: function (){
                   alert('Error');
              },
              success: function(data){
  
              alert('success');
  
              }
      });
  </code></pre>
  
  <p>But i get an 'error' alert and nothing goes to DB.</p>