May 12, 2013
cancan considered harmful
TL;DR overwrite as_json on all your CanCan Ability classes. Since I’ve started using squash for bug tracking I started noticing exceptions which prevented squash client from transmitting exceptions to the squash backend.
The exceptions squash was rescueing made squash raise a new exception!
Digging through the stack traces it became obvious that Ryan Bates cancan is the root of all evil.
To reproduce fire up irb and paste the following lines:
Read more