Swap rails dependency with activerecord