robwilkerson/CakePHP-Audit-Log-Plugin — pull request #5 by robations (2012-04-10 22:32:27+00:00)
Title: Rewritten behavior to allow calling methods on behaviors, closes #4

Hi Rob,

See what you think. I've also edited AuditableTest.php (not sure this was fully working after CakePHP 2 rewrite?) and all pre-existing tests are passing. Tried to stick to your coding style as much as possible.

Using `is_callable` didn't actually work because I realised for a Model, everything is callable - it assumes it is an SQL procedure and tries to pass it to the database layer... Anyway, realised Model has a method `hasMethod()` which should do the job (as long as the method is not protected or private - potential problem in CakePHP core).

Note - also included a fix for backward compat. issue that @jasonsnider addressed in a fork recently.