FINALLY WORKING ACTIVERECORD good lord the documentation around this is stupidly bad