Recreating AR using macros, method_missing, and queries.