An enhanced FlashComponent capable of
X-Ajax-Flashmessage for REST/AJAX requestsAttach it to your controllers in initialize() like so:
$this->loadComponent('Tools.Flash');
Also add the helper for it:
public $helpers = array('Tools.Flash');
In your layouts, you don't need to change the $this->Flash->render() call, as the syntax for this helper is the same.
// Inside an action
$this->Flash->message('Yeah it works.', 'success');
$this->Flash->message('Careful.', 'warning');
$this->Flash->message('O o.', 'error');
// Inside an action
$this->Flash->success('Yeah it works.');
$this->Flash->warning('Careful.');
$this->Flash->error('O o.');