add ability to generate datasource from activerecord model, and fix test namespacing