Ok, that was too clever to actually work across multiple versions of Rails
Switch to more modern AR API for looking up records
Fix really old AR API call
HABTM is gone in 4.1 (thanks @kmcbride, closes #88)