$this->set('posts', $this->paginate());
//Add this line below above line
$this->helpers['Paginator'] = array('ajax' => 'Ajax');
I tried it several times changing values and variables but no success.
Instead of above you can use following two lines in the view file to tell the "Paginator", to use Ajax helper.
$this->Paginator->_ajaxHelperClass = "Ajax";
$this->Paginator->Ajax = $this->Ajax;
$this->Paginator->options(array("update" => "",'evalScripts' => true));
You also do NOT need to add the line
echo $this->Js->writeBuffer();
at the end of view file.