/** Recibe la peticion con una calificacion de un usuario (ajax/production/rating/post)
  * 
  * @param Request $request
  */
 function ajax_postRating(Request $request)
 {
     if (!$request->ajax()) {
         return json_encode(array());
     }
     $data = $request->all();
     if (ProductionRating::userIsRated($data["production_id"])) {
         return json_encode(array());
     }
     $rating = new ProductionRating();
     $rating->user_id = Auth::user()->id;
     $rating->production_id = $data["production_id"];
     $rating->rating = $data["rating"];
     $rating->date = DateUtil::getCurrentTime();
     $rating->save();
     return json_encode(array());
 }