Skip to content

Instantly share code, notes, and snippets.

View jmcneese's full-sized avatar

Joshua McNeese jmcneese

View GitHub Profile
<?php
/**
* Provides counter cache behavior for HABTM records.
*
* Example: Posts habtm Tags and tags table contains post_count field
*
* class Post extends AppModel {
* var $name = 'Post';
* var $actsAs = array('HabtmCounterCache');
* var $hasAndBelongsToMany = array('Tag');